Advanced Row Formatting - XSLT

Release 1.0 - ...

Since every datatable can easily be converted into an XML document, formatting allows you to use XSLT to transform your data. If the output of a transformation is again valid XML, you may specify another Xslt that will also be executed. The XSLTs will be executed in the order in which they are defined. You can even start with a rowformat to format the entire datatable and then afterwards apply multiple XSLT transformations, provided that the output of the rowformat is valid XML.

Example:

Smartsite SXML CopyCode image Copy Code
<se:sqlquery sql="select 13 as Day, 'Friday' as Weekday">
  <se:parameters>
    <se:parameter name="format">
 
      <se:rowformat>
        <div style="border: solid 5px red">
          {this.field(2)}, {this.field(1)}th.
        </div>
      </se:rowformat>
 
      <se:xslt>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
          <xsl:output omit-xml-declaration="yes" />
          <xsl:template match="/">
            <div style="border: solid 5px yellow">
              <xsl:copy-of select="/" />
            </div>
          </xsl:template>
        </xsl:stylesheet>
      </se:xslt>
 
      <se:xslt>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
          <xsl:output omit-xml-declaration="yes" />
          <xsl:template match="/">
            <div style="border: solid 5px green">
              <xsl:copy-of select="/" />
            </div>
          </xsl:template>
        </xsl:stylesheet>
      </se:xslt>
 
      <se:xslt>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
          <xsl:output omit-xml-declaration="yes" />
          <xsl:template match="/">
            <div style="border: solid 5px cyan">
              <xsl:copy-of select="/" />
            </div>
          </xsl:template>
        </xsl:stylesheet>
      </se:xslt>
 
      <se:xslt>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
          <xsl:output omit-xml-declaration="yes" />
          <xsl:template match="/">
            <div style="border: solid 5px blue">
              <xsl:copy-of select="/" />
            </div>
          </xsl:template>
        </xsl:stylesheet>
      </se:xslt>
 
    </se:parameter>
  </se:parameters>
</se:sqlquery>