Developer’s Guide

Table Of Contents
Using FileMaker Pro XML to deliver your data 7-15
<head>
<style type="text/css">
table {font-family: sans-serif; font-size:
10pt; }
td.label { text-align: right; vertical-align:
text-top; font-weight: bold; }
</style>
</head>
<body>
<img src="/xml/simple examples/FileMaker.gif"
/>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="fm:ROW">
<table>
<tr>
<td class="label">Name</td>
<td><xsl:value-of select="fm:Name"/></td>
</tr>
<tr>
<td class="label">Title</td>
<td><xsl:value-of select="fm:Title"/></td>
</tr>
<tr>
<td class="label">Telephone Number</td>
<td><xsl:value-of select="fm:Phone"/></td>
</tr>
<tr>
<td class="label">Picture</td>
<td><xsl:element name="img"><xsl:attribute
name="src"><xsl:value-of select="fm:Picture"/>
</xsl:attribute></xsl:element></td>
</tr>
</table>
</xsl:template>
<!--
Don't display anything for the following elements.
-->
<xsl:template
match="fm:ERRORCODE|fm:DATABASE|fm:LAYOUT">
</xsl:template>
</xsl:stylesheet>
JavaScript scripting language example
Using HTML and a scripting language with your XML document
can allow your web users to interact with the database after it has
been downloaded. For example, a simple onClick scripting event
handler can allow web users to click a button and see different
records in the database.
This example demonstrates the use of the JavaScript scripting
language with an XML document to publish the People.fp5 database
on a web page. It starts with an HTML file, named People_form.htm,
that 1) references the JavaScript library, FMP.js, 2) contains a simple
HTML form with a table for the field and picture rows, and 3) builds
and executes a CGI command to FileMaker Pro to find and
download all the records in the People.fp5 database.
With JavaScript, you can manipulate the data
in the XML document to display different
records in the database—after the data has
been downloaded