Custom Web Publishing Guide

Table Of Contents
140 Custom Web Publishing Guide
CDML tag name: Portal
Repeats the HTML between [FMP-Portal] and [/FMP-Portal] for each record in a specified portal
CDML syntax: [FMP-Portal: RelationshipName]...[/FMP-Portal]
XSLT-CWP conversion:
1 when current context is a record: <xsl:for-each select="fmrs:relatedset[@table = 'RelationshipName']/
fmrs:record">...</xsl:for-each>
1 otherwise: <xsl:for-each select="/fmrs:fmresultset/fmrs:resultset/fmrs:record/
fmrs:relatedset[@table='
RelationshipName']/fmrs:record">...</xsl:for-each>
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-Portal] not in a valid location -->
CDML tag name: Range End
Tag is replaced with the record number of the last record being displayed
CDML syntax: [FMP-RangeEnd]
XSLT-CWP conversion:
1 when inside SGML element attribute value: {$current-skip + /fmrs:fmresultset/fmrs:resultset/@fetch-size}
1 otherwise: <xsl:value-of select="$current-skip + /fmrs:fmresultset/fmrs:resultset/@fetch-size"/>
1 if used in document: $current-skip variable is created at top-level using named template from the
cdml2xsl_utilities.xsl stylesheet
Conversion example
Original CDML: [FMP-Portal: lineitems]
[FMP-CurrentPortalRowNumber]: [FMP-Field: lineitems::name]<br>
[/FMP-Portal]
Converted XSLT-CWP: <xsl:for-each select="fmrs:relatedset[@table='lineitems']/fmrs:record">
<xsl:value-of select="position()"/>: <xsl:value-of select="fmrs:field[@name = 'name']" /><br />
</xsl:for-each>
Converted Result: 1: Red<br>
Conversion example
Original CDML: Records [FMP-RangeStart] through [FMP-RangeEnd]
Converted XSLT-CWP: Records <xsl:value-of select="$current-skip + 1"/> through <xsl:value-of select="$current-
skip + /fmrs:fmresultset/fmrs:resultset/@fetch-size"/>
Converted Result: Records 6 through 10