Advanced Row Formatting - XSLT 3

New, improved syntax (iXperion 1.3+)

Smartsite SXML CopyCode image Copy Code
<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:locale.formatlongdate(./Birth, viper:buffer.get('cult'))" /> and has
          <xsl:value-of select="viper:locale.formatcurrency(./Money, viper:buffer.get('cult'))" />.
        </xsl:for-each>
      </xsl:template>
    </xsl:stylesheet> 
  </se:xslt> 
</se:format>
Example Result CopyCode image Copy Code
John was born on Wednesday, April 14, 1965 and has $144.00.
Peter was born on Friday, October 5, 1973 and has $845.00.