Custom Web Publishing Guide

Table Of Contents
Appendix C
|
Converting CDML solutions to FileMaker XSLT 161
CDML tag name: Value Name Item
Tag is replaced by the name of a value list. This is always found within a [FMP-ValueNames] loop.
CDML syntax: [FMP-ValueNameItem: Encoding], where Encoding is 'Raw', 'URL', or 'HTML' (default)
XSLT-CWP conversion:
1 when inside SGML element attribute value: {@NAME}
1 otherwise: <xsl:value-of select="@NAME" />
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-ValueNames] not in a valid location -->
1 when outside of a [FMP-ValueNames] loop: <!-- CDML Converter ERROR: [FMP-ValueNameItem] outside of
[FMP-ValueNames]
-->
1 if used in document: $layout variable is created at top-level of document
Converted
Result:
<input type="radio" name="Groups" value="Production">Production
<input type="radio" name="Groups" value="Sales" checked>Sales
<input type="radio" name="Groups" value="Support">Support
Conversion example
Original CDML: <select name="–sortorder">
<option>Ascending
<option>Descending
[FMP-ValueNames]
<option value="Custom=[FMP-ValueNameItem]">[FMP-ValueNameItem]
[/FMP-ValueNames]
</select>
Converted XSLT-CWP: <select name="–sortorder.1">
<option />Ascending
<option />Descending
<xsl:for-each select="$layout/fml:fmpxmllayout/fml:VALUELISTS/fml:VALUELIST">
<option value="Custom={@NAME}" /><xsl:value-of select="@NAME" />
/xsl:for-each>
</select>
Converted Result: <select name="–sortorder.1">
<option />Ascending
<option />Descending
<option value="Custom=Colors">Colors
<option value="Custom=Sizes">Sizes
</select>
Conversion example