Advanced Row Formatting - XSLT 2
This call syntax is deprecated as of iXperion 1.3, since Viper Methods can now be called as real XSLT extension methods.
| Smartsite SXML |
|
|---|---|
<se:xmldatatable save="mydata" resulttype="datatable">
<se:row>
<se:col name="Name">John</se:col>
<se:col name="Birth">1965/04/14</se:col>
<se:col name="Money">144</se:col>
</se:row>
<se:row>
<se:col>Peter</se:col>
<se:col>1973/10/05</se:col>
<se:col>845</se:col>
</se:row>
</se:xmldatatable>
{buffer.set(cult, 'en-us')}
<se:format inputdata="mydata">
<se:xslt>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:viper="http://smartsite.nl/namespaces/viper/1.0">
<xsl:output omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:for-each select="/moduleresult/row">
<xsl:value-of select="./Name" /> was born on
<xsl:value-of select="viper:exec('locale.formatlongdate(this.param(1), $cult)', ./Birth)" /> and has
<xsl:value-of select="viper:exec('locale.formatcurrency(this.param(1), $cult)', ./Money)" />.
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</se:xslt>
</se:format>
|
|
| Example Result |
|
|---|---|
John was born on Wednesday, April 14, 1965 and has $144.00. Peter was born on Friday, October 5, 1973 and has $845.00. |
|