Custom Web Publishing Guide

Table Of Contents
58 FileMaker Server Advanced Custom Web Publishing Guide
About the encoding of XSLT stylesheets
In addition to the encoding for requests and output pages, the encoding of your XSLT stylesheets must be
specified in the encoding attribute of the XML declaration at the top of the stylesheet. You can use any of
the text encodings listed in the table on
page 57.
For example, this declaration specifies UTF-8 as the encoding of the stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
If you don’t specify the stylesheet encoding, the Web Publishing Engine assumes the encoding is UTF-8.
Processing XSLT requests that do not query FileMaker Server
You can use the –process query command to process XSLT requests that do not need any data from the
database, or if your stylesheet does not require database-specific information, such as records, field names,
or layout names. By using the
–process command in these types of situations, you can reduce the workload
for FileMaker Server.
For example, you can use the –process command to:
1 load a stylesheet that generates a static page, if no database information is needed
1 load a stylesheet that creates a new record, if the stylesheet does not require any database or layout
information, such as a value list
1 use an extension function such as fmxslt:send_email() that doesn’t require data from the database
1 access information stored in a session if no database information is needed
The –process command returns an XML document that contains product information about the Web
Publishing Engine.
The only required parameter for the –process command is –grammar, and you must use the fmresultset
grammar or the
FMPXMLRESULT grammar.
For example:
http://192.168.123.101/fmi/xsl/my_template/my_stylesheet.xsl?–grammar=fmresultset&–process
Using tokens to pass information between stylesheets
You can use the –token query parameter in a URL or as a statically defined query command to pass any
user-defined information between stylesheets without using sessions or cookies. The
–token query
parameter is optional with all query commands.
The user-defined parameter value can be any character string that is URL encoded. For example:
http://192.168.123.101/fmi/xsl/template/my_stylesheet.xsl?–db=products&–lay=sales&–grammar=fmresultset
&–token.D100=Pending&–findall
See “–token.[string] (Pass values between XSLT stylesheets) query parameter” on page 101.
Important Do not use the –token query parameter to pass private data.
To retrieve the value of the –token query parameter, use the <xsl:param name="request-query" /> statement. See
Accessing the query information in a request” on page 59.