Custom Web Publishing Guide

Table Of Contents
142 Custom Web Publishing Guide
CDML tag name: Record
Repeats the HTML between [FMP-Record] and [/FMP-Record] for every record up to -Max, starting after
skipping -Skip records
CDML syntax: [FMP-Record]...[/FMP-Record]
XSLT-CWP conversion:
1 <xsl:for-each select="/fmrs:fmresultset/fmrs:resultset/fmrs:record">...</xsl:for-each>
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-Record] not in a valid location -->
CDML tag name: Repeating
Repeats the HTML between [FMP-Repeating] and [/FMP-Repeating] for all the repetitions of the specified
field. The tag [FMP-RepeatingItem] is replaced with the contents of a specific repetition.
CDML syntax: [FMP-Repeating: FieldName]...[/FMP-Repeating]
XSLT-CWP conversion:
1 when current context is a record: <xsl:for-each select="fmrs:field[@name = 'FieldName']/fmrs:data">...</
xsl:for-each>
1 otherwise: <xsl:for-each select="/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name =
'
FieldName']/fmrs:data">...</xsl:for-each>
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-Repeating] not in a valid
location -->
Conversion example
Original
CDML:
[FMP-Record]
[FMP-Field: Country] - [FMP-Field: Capital]<br>
[/FMP-Record]
Converted
XSLT-CWP:
<xsl:for-each select="/fmrs:fmresultset/fmrs:resultset/fmrs:record">
<xsl:value-of select="fmrs:field[@name = 'Country']/fmrs:data[1]" /> -
<xsl:value-of select="fmrs:field[@name = 'Capital']/fmrs:data[1]" />
<br />
</xsl:for-each>
Converted
Result:
Great Britain - London<br>
France - Paris<br>
USA - Washington D.C.<br>
Conversion example
Original CDML: [FMP-Repeating: extensions]
[FMP-CurrentRepeatNumber]: [FMP-RepeatingItem]<br>
[/FMP-Repeating]
Converted XSLT-CWP: <xsl:for-each select="fmrs:field[@name = 'extensions']/fmrs:data">
<xsl:value-of select="position()" />: <xsl:value-of select="." /><br />
</xsl:for-each>
Converted Result: 3: Green<br>