|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sort Problem
Hello,
I have an xslt document which I am using to attempt to sort some xml data. The unique part is that I am trying to sort by attributes. I know this sounds easy, but it's still giving me fits. I have successfully written a test application so I definately understand the basics. Here is the xml that I am trying to sort upon: <info> <table:Row col1='001' col2='User' col3='Name' /> <table:Row col1='002' col2='Another' col3='User' /> </info> Here is the xslt: <xsl:template match="info"> <xsl:for-each select="table:Row"> <xsl:sort select="@col1" /> <tr> <xsl:for-each select="@*"> <td nowrap="true"><xsl:value-of select="." /></td> </xsl:for-each> </tr> </xsl:for-each> </xsl:template> Please assume that these pieces of information are wrapped in their appropriate xml/xslt stuff. I know that I have the correct values because I am able to print the values out to the screen, as long as the sort element is not there. As soon as I add the sort element, nothing is displayed on the scree. Thanks |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Sort Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|