Developer’s Guide

Table Of Contents
7-14 Developer’s Guide
* The following styles are applied to the actual field data.
*/
Name
{
position: absolute;
left: 180px;
top: 20px;
}
Title
{
position: absolute;
left: 180px;
top: 40px;
}
Phone
{
position: absolute;
left: 180px;
top: 60px;
}
Extensible Stylesheet Language–Transformations (XSLT)
example
Extensible Stylesheet Language–Transformations (XSLT) is a
language for transforming XML documents into other XML
documents. XSLT is part of the overall XSL specification, which
also includes an XML vocabulary for formatting the transformed
XML document (such as applying text styles).
This example demonstrates the use of an XSL document with an
XML document. The following CGI command was used to generate
the FMPDSORESULT grammar for the People.fp5 database and to
apply the People_form.xsl stylesheet to the generated XML data:
fmpro?–db=people.fp5&–lay=xml form&–format=dso_xml&
–styletype=text/xsl&–stylehref=people_form.xsl&–max=1&–find=
The three global fields for field labels in the People.fp5 database are
not necessary when you’re using an XSL document. You can use
XSLT to add labels after the XML document has been generated by
FileMaker Pro.
Note You can also include scripting (such as JavaScript) in your
XSL document. See “JavaScript scripting language example” next.
The following text is the people_form.xsl stylesheet, which adds
labels and transforms the URL in the Picture field into an image:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns:fm="http://www.filemaker.com/fmpdsoresult">
<!--
The following two templates have been added for IE5 Windows,
since that browser's XSL processor does not provide defaults for
them.
-->
<xsl:template><xsl:apply-templates/></xsl:template>
<xsl:template match="text()"><xsl:value-of select="."/></
xsl:template
<xsl:template match="fm:FMPDSORESULT">
<html>
XSL lets you display images in container
fields, format the data, and add field labels
and a logo to the XML document