Custom Web Publishing Guide

Table Of Contents
Chapter 5
Developing FileMaker XSLT stylesheets
This chapter contains information about how FileMaker XSLT stylesheets are constructed and how to use the
FileMaker XSLT extension functions.
Using XSLT stylesheets with the Web Publishing Engine
When developing and using XSLT stylesheets to request FileMaker XML data via the Web Publishing Engine,
be aware of the following points:
1 To use an XSLT stylesheet with the Web Publishing Engine, you must specify the name of the XSLT
stylesheet in a URL. If you don’t specify a stylesheet, or if the Web Publishing Engine is unable to find or
parse the stylesheet, the Web Publishing Engine displays an error page. See
“About the URL syntax for
FileMaker XSLT stylesheets” on page 48.
1 The stylesheet filename and the folder name where the stylesheet is stored must be URL-encoded UTF-8.
If your stylesheet must be compatible with older web browsers, limit the names to ASCII characters.
1 You must specify the FileMaker XML grammar to use, either as a query parameter in the URL, or as a
statically defined query parameter in the <?
xslt-cwp-query?> processing instruction. If you don’t specify an
XML grammar, the Web Publishing Engine displays an error. See
“Specifying an XML grammar for a
FileMaker XSLT stylesheet” on page 50.
1 You can specify the query parameters that identify the FileMaker XML data you want to request either in
the URL, or as a statically defined query parameter in the
<?xslt-cwp-query?> processing instruction. See
“About the URL syntax for FileMaker XSLT stylesheets” on page 48 and “Using statically defined query
commands and query parameters” on page 51.
1 You can optionally specify the text encoding of an XSLT request by using the –encoding query parameter.
If you don’t specify an encoding, the Web Publishing Engine uses its default text encoding setting for
requests. See
“Setting text encoding for requests” on page 52.
1 You can optionally specify an output method via the method attribute of the <xsl:output> element. If you
don’t specify an output method, the Web Publishing Engine uses HTML as the output. You can also
optionally specify the output page encoding by using the encoding attribute of the
<xsl:output> element. If
you don’t specify an encoding, the Web Publishing Engine uses its default text encoding setting for output
pages. See
“Specifying an output method and encoding” on page 53.
1 You can optionally specify the text encoding for email messages sent from the Web Publishing Engine via
a function parameter for the fmxslt:send_email() extension function. See “Sending email messages from the
Web Publishing Engine” on page 61.
To construct a request, the Web Publishing Engine begins by using any query command and query parameters
that are statically defined in the optional
<?xslt-cwp-query?> processing instruction. The statically defined
query command and parameters become the base request. The
<?xslt-cwp-query?> processing instruction is not
required in a stylesheet, but its base request takes precedence over any matching query command or parameters
that are specified in the URL query string. The Web Publishing Engine then adds to the base request any query
command or additional parameters in the URL query string that are
not defined in the <?xslt-cwp-query?>
processing instruction. The Web Publishing Engine uses this request to obtain the FileMaker XML data and
return it to your web browser or program in the output method you specified, or as HTML.