XSL value-of question

admin

Administrator
Staff member
I am converting the re-usable table viewer xsl as a template, basicallybecause I want the client side sort stuff. However I am tring to change ita little and can't get the syntax down. I don't exactly understand the foreach loop and the order-by clause.Here is the original code.<xsl:for-each select="./*" order-by="./*[0]"><tr><xsl:for-each select="./*"><td> <xsl:value-of/></td></xsl:for-each></tr></xsl:for-each>Here is what I want to do.<xsl:for-each select="./*" order-by="./*[0]"><tr><xsl:for-each select="./*"><td><font color="black"><xsl:value-ofselect="ID"/></font></td><td><font color="black"><xsl:value-ofselect="Address"/></font></td><td><xsl:value-of select="Group"/></td><td><xsl:value-of select="CreateDate"/></td></xsl:for-each></tr></xsl:for-each>Here is a xml snippet<EmailList xmlns:dt="urn:schemas-microsoft-com:datatypes"><EmailAddr><ID>602</ID><Address>[email protected]</Address><Group>PSALL</Group><CreateDate>6/21/2001</CreateDate></EmailAddr><EmailAddr><ID>5457</ID><Address>[email protected]</Address><Group>PPACA</Group><CreateDate>6/21/2001</CreateDate></EmailAddr></EmailList>ThanksJC
 
Back
Top