Custom Web Publishing Guide

Table Of Contents
60 FileMaker Server Advanced Custom Web Publishing Guide
An XML document fragment is loaded into the request-query parameter in the following grammar:
<!DOCTYPE query [
<!ELEMENT query (parameter)*>
<!ATTLIST query action CDATA #REQUIRED>
<!ELEMENT parameter (#PCDATA)>
<!ATTLIST parameter name CDATA #REQUIRED>
]
Note The query information is defined to be in the namespace fmq="http://www.filemaker.com/xml/query".
Make sure you include a declaration of the
fmq namespace in the <xsl:stylesheet> element at the start of your
XSLT stylesheet. See
“About namespaces and prefixes for FileMaker XSLT stylesheets” on page 55.
For example, suppose you want to access the query commands and query parameters in this request:
http://192.168.123.101/fmi/xsl/my_stylesheet.xsl?–db=products&–lay=sales&–grammar=fmresultset&–token.1=abc123
&–findall
If you include the <xsl:param name="request-query" /> statement before the template section, the Web
Publishing Engine will store this XML document fragment in that parameter:
<query action="my_stylesheet.xsl" xmlns="http://www.filemaker.com/xml/query">
<parameter name="–db">products</parameter>
<parameter name="–lay">sales</parameter>
<parameter name="–grammar">fmresultset</parameter>
<parameter name="–token.1">abc123</parameter>
<parameter name="–findall"></parameter>
</query>
You can then use the request-query parameter to access the value of a token that was passed in a URL by
using an XPath expression. For example:
$request-query/fmq:query/fmq:parameter[@name = '–token.1']
Obtaining client information
You can use the following FileMaker XSLT parameters to obtain information from the Web Publishing
Engine about a web client’s IP address, user name, and password:
<xsl:param name="client-ip"/>
<xsl:param name="client-user-name"/>
<xsl:param name="client-password">
Include these parameter statements in your XSLT stylesheet before the top <xsl:template> element.
These parameters provide the web user’s credentials when a stylesheet programmatically loads additional
password-protected XML documents. See
“Loading additional documents” on page 61. The web user must
provide the user name and password initially via the HTTP Basic Authentication dialog box. See “When
web users use Custom Web Publishing to access a protected database” on page 19.
For more information and examples of using these three FileMaker XSLT parameters, see the FileMaker
XSLT Extension Function Reference.