Custom Web Publishing Guide

Table Of Contents
Developing FileMaker XSLT stylesheets 53
Specifying an output method and encoding
You can specify an output method and encoding of output pages by using the method and encoding attributes
of the
<xsl:output> element. Both of these attributes are optional.
The method attribute specifies the type of output, which can be “html”, “text”, or “xml”. No other method
types are supported. If you don’t specify a method, the Web Publishing Engine uses the “html” method.
The encoding attribute specifies the encoding of the output pages. You can specify any of the encodings listed
in the table in the previous section. If you don’t specify an encoding, the Web Publishing Engine uses its
default text encoding setting for output pages.
For example:
<xsl:output method="html" encoding="ISO-8859-1"/>
If you don’t use the <xsl:output> element in a stylesheet, the Web Publishing Engine outputs HTML pages using
the current default text encoding setting for output pages.
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 52.
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