Custom Web Publishing Guide

Table Of Contents
128 FileMaker Server Advanced Custom Web Publishing Guide
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 63.
CDML tag name: Cookie
Tag is replaced with the current value of the specified cookie
CDML syntax: [FMP-Cookie: CookieName, Encoding], where Encoding is 'Raw' (default), or 'URL'
XSLT-CWP conversion:
1 when inside SGML element attribute value: {fmxslt:get_cookie('CookieName')}
1 otherwise: <xsl:value-of select="fmxslt:get_cookie('CookieName')" />
CDML tag name: Current Action
Tag is replaced with the name of the current action, such as: find, findall, new, edit, delete, view, or dup. The
returned name does not include the dash (
) character.
CDML syntax: [FMP-CurrentAction: Encoding], where Encoding is 'HTML' (default), or 'Display'
XSLT-CWP conversion:
1 when inside SGML element attribute value: {$current-action}
1 otherwise: <xsl:value-of select="$current-action" />
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.)
Conversion example
Original CDML: Thanks for coming back! The latest products in [FMP-Cookie: ColorChoice] are listed
below
Converted XSLT-CWP: Thanks for coming back! The latest products in <xsl:value-of
select="fmxslt:get_cookie('ColorChoice')" /> are listed below.
Converted Result: Thanks for coming back! The latest products in green are listed below.