Custom Web Publishing Guide

Table Of Contents
Converting CDML solutions to FileMaker XSLT 103
The converted format.xsl stylesheet contains the following statements:
<xsl:include href="cdml2xsl_includes.xsl"/>
<xsl:variable name="_errorcode" select="/fmrs:fmresultset/fmrs:error/@code"/>
<xsl:variable name="token.error" select="$request-query/fmq:query/fmq:parameter[@name = '-token.error']"/>
<xsl:variable name="token.errnum" select="$request-query/fmq:query/fmq:parameter[@name = '-token.errnum']"/>
<xsl:choose>
<xsl:when test="$token.error != '' and ($_errorcode = $token.errnum)">
<xsl:call-template name="error"/>
</xsl:when>
<xsl:otherwise>
[... converted format.xsl code here ...]
</xsl:otherwise>
</xsl:choose>
The error.html file is converted to an error.xsl stylesheet that contains a named template:
<xsl:template name="err">
[... converted error.xsl code here ... ]
</xsl:template>
The CDML Converter includes all error files in a global error file named cdml2xsl_includes.xsl. The following
statement includes the global error file in all stylesheets that have error handling:
<xsl:include href="error.xsl"/>
...
If an error occurs when the format.xsl stylesheet is processed, and the error code matches the error number
specified for the –token.errnum query parameter, the code from error.xsl is executed when format.xsl calls the
template named error. This behavior matches the original CDML –error and –errornum functionality.
Conversion of obsolete CDML action tags
Here’s how the CDML Converter handles the conversion of the following obsolete CDML action tags:
This obsolete
CDML action tag Is
-dbclose Replaced by this comment after the original action tag location:
<!-- CDML Converter ERROR: '-dbclose' not supported by XSLT-CWP -->
-dbopen Replaced by this comment after the original action tag location:
<!-- CDML Converter ERROR: '-dbopen' not supported by XSLT-CWP -->
-img Removed and the specified URL for the image is converted to new URL syntax for container
objects. See
“About the URL syntax for FileMaker container objects in XML solutions,” and
“About the URL syntax for FileMaker container objects in XSLT solutions” on page 48.