Custom Web Publishing Guide

Table Of Contents
140 FileMaker Server Advanced Custom Web Publishing Guide
CDML tag name: Field
Tag is replaced with the contents of the specified field
CDML syntax: [FMP-Field: FieldName, Encoding], where Encoding is 'Raw', 'URL', 'HTML' (default), or 'Break'
XSLT-CWP conversion:
1 when inside SGML element attribute value:
1 when current context is a record: {fmrs:field[@name = 'FieldName']/fmrs:data[1]}
1 otherwise: {/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name = 'FieldName']/fmrs:data[1]}
1 otherwise:
1 when current context is a record: <xsl:value-of select="fmrs:field[@name = 'FieldName']/fmrs:data[1]" />
1 otherwise: <xsl:value-of select="/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name =
'
FieldName']/fmrs:data[1]" />
Conversion example
Original CDML: [FMP-If: (Field:country.Eq.us).or.(Field:country.Eq.usa)]
United States of America
[FMP-ElseIf: Field:country .Eq. Italy]
Italy
[/FMP-If]
Converted XSLT-CWP: <xsl:choose>
<xsl:when test="'fmrs:field[@name = 'country']/fmrs:data[1] = 'us' or fmrs:field[@name =
'country']/fmrs:data[1] = 'usa'">United States of America</xsl:when>
<xsl:when test="fmrs:field[@name = 'country']/fmrs:data[1] = 'Italy'">Italy</xsl:when>
</xsl:choose>
Converted Result: Italy
Conversion example
Original CDML: First Name: [FMP-Field: First Name]
Converted XSLT-CWP: First Name: <xsl:value-of select="fmrs:field[@name = 'First Name']/fmrs:data[1]" />
Converted Result: First Name: John