Custom Web Publishing Guide

Table Of Contents
116 FileMaker Server Advanced Custom Web Publishing Guide
1 If a CDML request does not specify a –max query parameter for a –find or –findall query command, the
CDML Converter adds
–max=25 to the converted XSLT request. The CDML Converter uses the value 25
to create the same behavior as the original CDML request in which 25 records are returned if the
–max
query parameter is not specified. Note that this behavior has changed in XML or XSLT requests; if the
–max query parameter is not specified in an XML or XSLT request, all records are returned. See “–max
(Maximum records) query parameter” on page 96.
1 If a conversion error occurs, the CDML Converter inserts an error comment into the converted stylesheet
immediately after the element where the error occurred. You are required to manually fix errors in the
stylesheet. An error comment has the following format:
<!-- CDML Converter ERROR: <description of error> -->
1 If a conversion warning occurs, the CDML Converter inserts a warning comment into the converted
stylesheet immediately after the element where the cause of the warning occurred. You are not required
to fix warnings in the stylesheet, but you should investigate them to prevent other errors. A warning
comment has the following format:
<!-- CDML Converter WARNING: <description of warning> -->
1 The CDML Converter removes CDML action and variable tags that are obsolete from URLs, and inserts
an error comment in the stylesheet where they are removed. See “Conversion of obsolete CDML action
tags,” and “Conversion of obsolete CDML variable tags.”
1 The CDML Converter does not convert the obsolete –mail variable tags (such as –mailto and –mailfrom).
See
“Conversion of obsolete CDML variable tags” on page 118. To replace the email functionality
provided by the –mail variable tags, use an fmxslt:send_email () extension function. See “Sending email
messages from the Web Publishing Engine” on page 65.
1 If a <form> element with an action parameter ending in fmpro does not contain a –format <input> element,
the CDML Converter inserts the following error comment:
<!-- CDML Converter ERROR: parameter '–format' not found -->.
Conversion of the –error and –errornum CDML variable tags
The CDML Converter converts the CDML –error and –errornum tags into token values. For example, in this
original URL:
fmpro?–db=employees&–format=format.htm&–error=error.htm&–errnum=401&–view
the –error tag is converted to –token.error, and the –errnum tag is converted to –token.errnum. The converted
XSLT-CWP URL is:
format.xsl?–db=employees&–token.error=error.xsl&–token.errnum=401&–view
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>