Custom Web Publishing Guide

Table Of Contents
Chapter 5
|
Developing FileMaker XSLT stylesheets 55
About namespaces and prefixes for FileMaker XSLT stylesheets
Unique XSLT namespaces help distinguish XSLT tags by the application they were designed for. In the
<xsl:stylesheet> element at the start of all FileMaker XSLT stylesheets, declare the namespaces for the
FileMaker XSLT extension functions and the particular grammars you are using in the stylesheet.
You must also declare the following required namespace in each FileMaker XSLT stylesheet:
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Here is an example of namespace declarations:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmrs="http://www.filemaker.com/xml/fmresultset"
xmlns:fml="http://www.filemaker.com/fmpxmllayout"
xmlns:fmq="http://www.filemaker.com/xml/query"
xmlns:fmxslt="xalan://com.fmi.xslt.ExtensionFunctions"
exclude-result-prefixes="xsl fmrs fmq fml fmxslt">
Using statically defined query commands and query parameters
You can prevent the unauthorized use of query commands and query parameters with your FileMaker XSLT
stylesheet by statically defining the query commands and parameters that you want to use when XML data
is requested. Although not required, if any query commands and parameters are statically defined in a
stylesheet, they take precedence over any matching query command or parameters that a client may attempt
to specify in the URL query string.
The stylesheets generated by the Site Assistant and CDML Converter tools use statically defined query
commands and parameters. FileMaker recommends using statically defined query commands and
parameters as a best practice technique for enhancing the security of your solution.
To statically define query commands and parameters, use the following processing instruction at the
beginning of your FileMaker XSLT stylesheet:
<?xslt-cwp-query params="query string-fragment"?>
where:
query string-fragment is a string that contains the name-value pairs in the following format:
name=value&name2=value2....
If you use this Declare this namespace Use this prefix
fmresultset XML grammar xmlns:fmrs="http://www.filemaker.com/xml/fmresultset" fmrs
FMPXMLRESULT grammar xmlns:fmp="http://www.filemaker.com/fmpxmlresult" fmp
FMPXMLLAYOUT grammar xmlns:fml="http://www.filemaker.com/fmpxmllayout" fml
For the query XML grammar xmlns:fmq="http://www.filemaker.com/xml/query" fmq
For the FileMaker XSLT
extension functions
xmlns:fmxslt="xalan://com.fmi.xslt.ExtensionFunctions" fmxslt