Custom Web Publishing Guide

Table Of Contents
Appendix C
|
Converting CDML solutions to FileMaker XSLT 139
CDML tag name: Else
Tag is replaced with the specified data if the preceding [FMP-If] BooleanExpression is false
CDML syntax: [FMP-If: BooleanExpression1]...[FMP-Else]...[/FMP-If]
XSLT-CWP conversion:
1 <xsl:choose><xsl:when test="BooleanExpression1">...</xsl:when><xsl:otherwise>...</xsl:otherwise></
xsl:choose>
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-Else] not in a valid location -->
CDML tag name: Else If
Tag is replaced with the specified data if BooleanExpression is true, and the preceding [FMP-If]
BooleanExpression is false
CDML syntax: [FMP-If: BooleanExpression1]...[FMP-ElseIf BooleanExpression2]...[/FMP-If]
XSLT-CWP conversion:
1 <xsl:choose><xsl:when test="BooleanExpression1">...</xsl:when><xsl:when test="BooleanExpression2">...
</xsl:when></xsl:choose>
1 BooleanExpression2 is converted to XPath
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-ElseIf] not in a valid location -->
Conversion example
Original CDML: The value of token.5 is [FMP-CurrentToken: 5, HTML]
Converted XSLT-CWP: The value of token.5 is <xsl:value-of select="$request-query/fmq:query/
fmq:parameter[@NAME='–token.5']" />
Converted Result: The value of token.5 is MyValue
Conversion example
Original CDML: FMP-If: (Field:country.Eq.us).or.(Field:country.Eq.usa)]
United States of America
[FMP-Else]
Other country
[/FMP-If]
Converted XSLT-CWP: <xsl:choose>
<xsl:when test="'fmrs:field[@name = 'country']/fmrs:data[1] = 'us' or fmrs:field[@name =
'country']/fmrs:data[1] = 'usa'">United States of America</xsl:when>
<xsl:otherwise>Other country</xsl:otherwise>
</xsl:choose>
Converted Result: Other country