Wednesday, February 23, 2011

In the distinctSection there is no restriction you can start from any of the root map only you need to set the distinct control id in under use property, this distinct key will automatically find the all xml and distinct all the values mapped in the use property, Now using generic-id() you can easily get this distinct values of your xml.


I have placed here an example for my reference:-

<xsl:key name="distinctSection" match="elements/element[@type='Custom' and @title='Pay_Premium']/custom" use="./pansectitle"/>

<xsl:for-each select="/site/elements/element[@type='Custom']/custom[generate-id() = generate-id(key('distinctSection', ./pansectitle))]">

<xsl:value-of select="position()"/> : <xsl:value-of select="pantitle"/> [<xsl:value-of select="pansectitle"/>]

</xsl:for-each>

No comments:

Post a Comment