Sunday 1 July 2007

substring in xsl programming

* For loop from xsl files
<xsl:for-each select="/WSTResponse/Device">
<div id="detailDiv{@ID}">
ss
</div>
</xsl:for-each>

* Loop from style tag
<select name="Printer_name">
<xsl:for-each select="/WSTResponse/PluginInfo/WorkformParams/Param">
<option>
<xsl:attribute name="value">
<xsl:value-of select="value"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="value"/>
</xsl:attribute>
<xsl:variable name="printer"><xsl:value-of select="value"/></xsl:variable>
<xsl:value-of select="substring($printer, 0, 30)"/>
</option>
</xsl:for-each>
</select>

No comments: