Custom Web Publishing Guide

Table Of Contents
Appendix C
|
Converting CDML solutions to FileMaker XSLT 147
1 the request URL is created from the intratags ignoring any '-format' parameter
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-InlineAction] not in a valid location -->
CDML tag name: Layout Fields
Repeats the HTML between [FMP-LayoutFields] and [/FMP-LayoutFields] for all the fields on the layout
specified that was part of the request that created this page.
CDML syntax: [FMP-LayoutFields]...[/FMP-LayoutFields]
XSLT-CWP conversion:
1 <xsl:for-each select="fmrs:fmresultset/fmrs:metadata/fmrs:field-definition" />...</xsl:for-each>
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-LayoutFields] not in a valid location -->
Conversion example
Original
CDML:
[FMP-InlineAction: -db={currentdatabase}, title="s", -lay=web3, find=]
Title:[FMP-Field: Title], Artist: [FMP-Field: Artist]<br>
[/FMP-InlineAction]
Converted
XSLT-CWP:
<xsl:variable name="inline-action" select="document(concat($authenticated-xml-base-uri, '/fmi/
xml/fmresultset.xml?',
'-db=', /fmrs:fmresultset/fmrs:datasource/@database, '&amp;-lay=web3&amp;title=s&amp;-find'))"/>
<xsl:for-each select="$inline-action/fmrs:fmresultset/fmrs:resultset/fmrs:record">
<xsl:variable name="inline-action-record" select="current()"/>
Title:<xsl:value-of select="$inline-action-record/fmrs:field[@name = 'Title']/fmrs:data[1]"/>, Artist:
<xsl:value-of select="$inline-action-record/fmrs:field[@name = 'Artist']/fmrs:data[1]"/><br/>
</xsl:for-each>
Converted
Result:
Title: Mona Lisa, Artist: Leonardo da Vinci <br>
Title: Sunflowers, Artist: Vincent Van Gogh<br>
Conversion example
Original CDML: <select name="-SortField">
<option value="">-None-
[FMP-LayoutFields]
<option>[FMP-FieldName: Raw]
[/FMP-LayoutFields]
</select>
Converted XSLT-CWP: <select name="-SortField.1">
<option value="" />-None-</option>
<xsl:for-each select="fmrs:fmresultset/fmrs:metadata/fmrs:field-definition" />
<option /><xsl:value-of select="@name" />
</xsl:for-each>
</select>