Custom Web Publishing Guide

Table Of Contents
144 FileMaker Server Advanced Custom Web Publishing Guide
CDML tag name: Header
The HTTP header of the page sent to the browser is replaced with the text between the [FMP-Header] and [/
FMP-Header
] tags. None of the text between the tags will appear in the HTML portion of the page.
CDML syntax: [FMP-Header]...[/FMP-Header]
XSLT-CWP conversion:
1 if a status code is in the header contents: <xsl:variable name="header-status-code1"
select="set_status_code('<status code from contents>')" />
1 for each name-value pair in the header contents: <xsl:variable name="header-paramNUMBER"
select="fmxslt:set_header('<param name>', '<param value>')" />
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-Header] not in a valid location -->
CDML tag name: If
Along with the [FMP-Else], [FMP-ElseIf] and [/FMP-If] tags, the [FMP-If] tag controls what HTML is shown by
the browser
CDML syntax: [FMP-If BooleanExpression]...[/FMP-If]
XSLT-CWP conversion:
1 <xsl:choose><xsl:when test="BooleanExpression">...</xsl:when></xsl:choose>
1 BooleanExpression is converted to XPath
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-If] not in a valid location -->
Conversion example
Original CDML: Header code is here:
[FMP-Header]
HTTP/1.0 302 Moved Temporary
Location: http://www.FileMaker.com
[/FMP-Header]
Converted XSLT-CWP: Header code is here:
<xsl:variable name="header-status-code1" select="set_status_code(302)" />
<xsl:variable name="header-param1" select="fmxslt:set_header('location', 'http://
www.FileMaker.com')" />
Converted Result: Header code is here:
(The HTTP response also contains Location: http://www.filemaker.com in the header.)