Custom Web Publishing Guide

Table Of Contents
Converting CDML solutions to FileMaker XSLT 113
CDML tag name: Client Type
Tag is replaced with the current browser client type
CDML syntax: [FMP-ClientType]
XSLT-CWP conversion:
1 when inside SGML element attribute value: {fmxslt:get_header('User-Agent')}
1 otherwise: <xsl:value-of select="fmxslt:get_header('User-Agent')" />
CDML tag name: Client User Name
Tag is replaced with the client’s user name from HTTP authentication
CDML syntax: [FMP-ClientUserName]
XSLT-CWP conversion:
1 when inside SGML element attribute value: {$client-user-name}
1 otherwise: <xsl:value-of select="$client-user-name"/>
CDML tag name: Content MIME Type
Tag is replaced with nothing in the HTML, and changes the MIME type returned to the browser
CDML syntax: [FMP-ContentMimeType: MimeType]
XSLT-CWP conversion:
1 <xsl:variable name="header1" select="fmxslt:set_header('Content-Type', 'MimeType')" />
1 when inside SGML element attribute value: insert outside/after the element
Note Because the fmxslt:set_header() extension function is used after conversion, content buffering must be
enabled. To enable content buffering, the CDML Converter automatically inserts the
<?xslt-cwp-buffer?>
processing instruction. See
“Using content buffering” on page 58.
Conversion example
Original CDML: Your browser type is: [FMP-ClientType]
Converted XSLT-CWP: Your browser type is: <xsl:value-of select="fmxslt:get_header('User-Agent')" />
Converted Result: Your browser type is: Mozilla/3.01 (Macintosh; I; PPC)
Conversion example
Original CDML: Your name is: [FMP-ClientUserName]
Converted XSLT-CWP: Your name is: <xsl:value-of select="$client-user-name"/>
Converted Result: Your name is: my-user-name
Conversion example
Original CDML: Some sample [FMP-ContentMIMEType: text/plain] text.
Converted XSLT-CWP: Some sample <xsl:variable name="header1" select="fmxslt:set_header('Content-Type',
'text/plain')" /> text.
Converted Result: Some sample text.
(The HTTP response also contains Content-Type: text/plain in the header.)