Custom Web Publishing Guide

Table Of Contents
56 FileMaker Server Advanced Custom Web Publishing Guide
where:
name is a string that is the name of a query command, query parameter, or database field.
value is an arbitrary length string value. For query parameters and field names, use the particular value you
want to define, such as “
–db=products”. For query commands, don’t specify an equals (“=”) sign or a value
after the command name, such as
–findall. See appendix A, “Valid names used in query strings.
The strings used in the fragment must be URL encoded. See “About URL text encoding” on page 28.You
must use the same character encoding that is specified by the encoding attribute in the <xsl:output> tag. If no
encoding is specified, then the Web Publishing Engine uses its configured default encoding.
The separator between two name value pairs must be an ampersand (&).
For example, suppose you used the following processing instruction in a stylesheet named my_stylesheet.xsl:
<?xslt-cwp-query params="–db=products&–lay=sales&–grammar=fmresultset&productname=the%20item&–find"?>
This example processing instruction would force all requests for the my_stylesheet.xsl to use the fmresultset
grammar with the products database and the sales layout, and do a
–find request with the productname field
set to the value “
the%20item”.
If a client made the following request using my_stylesheet.xsl:
http://server.company.com/fmi/xsl/my_stylesheet.xsl?–lay=revenue&city=London&–edit
then the Web Publishing Engine would process the following XML request:
http://server.company.com/fmi/xml/fmresultset.xml?–db=products&–lay=sales&productname=the%20item&city=
London&–find
The statically defined query command and parameters override the –lay=revenue query parameter and the
–edit query command provided by the client. Because the city field was not statically defined in the
processing instruction, the Web Publishing Engine includes in the XML request the value of “
London” for
the city field that the client provided.
Setting text encoding for requests
The Web Publishing Engine performs the following steps in the order shown until it determines the
encoding of an XSLT request:
1. Checks if the charset attribute is set in the Content-Type request header.
2. Checks if you specified an encoding with the –encoding query parameter. You can specify this parameter
in a URL or as a statically defined query parameter in the
<?xslt-cwp-query?> processing instruction. The
value of the
–encoding parameter indicates the encoding used on the rest of the parameters in the request.
The valid values for this parameter are listed in the following table. For example:
http://192.168.123.101/fmi/xsl/template/my_stylesheet.xsl?–db=products–lay=sales&–grammar=fmresultset
&–encoding=Shift_JIS&–findall
3. Uses the current setting for the request and output pages default text encoding option for the Web
Publishing Engine. When the Web Publishing Engine is first installed, the initial default text encoding
setting for requests is UTF-8. You can change the Web Publishing Engine’s text encoding settings by
using the Administration Console. See the
FileMaker Server Advanced Web Publishing Installation
Guide
.