Custom Web Publishing Guide

Table Of Contents
108 Custom Web Publishing Guide
Manually fixing CDML conversion errors
There are some situations where the CDML Converter cannot automatically determine the correct conversion
from CDML to XSLT. For these types of situations, you must use a text editor or XSLT stylesheet editor to
manually fix the problems in the converted XSLT stylesheets:
1 In FileMaker Pro, script names are limited to 100 characters. During database conversion, any script names
over this limit are truncated in the database. Since the CDML Converter does not truncate script names over
this limit, you must change the script name in the XSLT stylesheet to match the truncated name in the
database.
1 The CDML Converter uses the configured locale on the host computer where the Web Publishing Engine
is installed when inserting server-side functions in the XSLT stylesheets, such as
fmxslt:get_date() and
fmxslt:get_time(). If your CDML format files include date and time formatting strings that are passed to these
functions, you must manually localize the strings after the conversion, such as changing Month/Day/Year
to Day/Month/Year.
1 If a CDML solution contains a form that provides a user-selectable value for the –format tag, such as a
choice of format files, the CMDL Converter cannot automatically create a functionally equivalent XSLT
solution. You must manually edit the converted XSLT solution with a separate request for each XSLT
stylesheet you want to offer web users.
1 If your CDML solution contains query requests that use the –lay tag to specify a layout, make sure the
specified layouts contain all of the fields referenced in the requests. If the specified layout does not contain
all of the fields, you must either add the fields to the layout or manually change the –lay query parameter
to refer to a layout that does contain all of the fields. Alternatively, if you need to submit a request using a
layout which contains fields that don’t exist in another layout, you can use the –lay.response query
parameter to switch layouts. See
“Switching layouts for an XML response” on page 35.
1 If your CDML solution contains query requests that do not use the –lay tag to specify a layout, the CDML
Converter automatically adds a –lay query parameter to the requests and specifies a value of
AllFieldsLayout. You must either manually change the value for the –lay parameter in the converted
stylesheets to match the layout you want to use in your database, or add a layout called AllFieldsLayout to
your database.
1 If your CDML solution contains -script, -script.prefind, or -script.presort variable tags, check the script
functionality in the converted XSLT stylesheet.
1 In CDML, field and database name comparisons were case-insensitive, which allowed you to use a tag such
as [FMP-Field:myfield] to refer to a field named MyField or myField. In XSLT-CWP, field and database
name comparisons are case-sensitive if they are not used in a query string. In the converted stylesheets, you
must manually fix any field and database names in XSLT statements (excluding query strings) to exactly
match the names used in the database solution, including the case of the name.
For example, in this statement:
<xsl:value-of select="fmrs:field[@name='LastName']"/>
the field reference LastName must exactly match the name and case of the LastName field in the database.
Note In XSLT-CWP, field and database names used in query strings are case-insensitive. See “Guidelines
for using query commands and parameters” on page 76.