Custom Web Publishing Guide

Table Of Contents
156 FileMaker Server Advanced Custom Web Publishing Guide
CDML tag name: Repeating Item
Tag is replaced with the contents of the next repetition. This is always found within a [FMP-Repeating] loop.
CDML syntax: [FMP-RepeatingItem: Encoding], where Encoding is 'Raw', 'URL', 'HTML' (default), or 'Break'
XSLT-CWP conversion:
1 when inside SGML element attribute value: {.}
1 otherwise: <xsl:value-of select="." />
CDML tag name: Set Cookie
Tag is replaced with nothing in the HTML and is used to store a variable in the user’s browser. The Expires,
Path, and Domain parameters are optional.
CDML syntax: [FMP-SetCookie: name=value, Expires=expires, Path=path, Domain=domain]
XSLT-CWP conversion:
1 <xsl:variable name="cookie-name" select="fmxslt:set_cookie('name', 'value', 'expires', 'path', 'domain')" />
1 undefined optional parameters expires, path, domain are passed as empty strings.
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-SetCookie] not in a valid
location -->
Conversion example
Original CDML: [FMP-Repeating: extensions]
[FMP-CurrentRepeatNumber]: [FMP-RepeatingItem]<br>
[/FMP-Repeating]
Converted XSLT-CWP: <xsl:for-each select="fmrs:field[@name = 'extensions']/fmrs:data">
<xsl:value-of select="position()" />: <xsl:value-of select="." /><br />
</xsl:for-each>
Converted Result: 3: Green<br>
Conversion example
Original CDML: Set-Cookie here: [FMP-SetCookie: ColorChoice=Green, Expires=43200]
Converted XSLT-CWP: Set-Cookie here: <xsl:variable name="cookie-ColorChoice"
select="fmxslt:set_cookie('ColorChoice', 'Value', '43200', '', '')" />
Converted Result: Set-Cookie here: