Subject: Re: [xsl] Ordering my HTML output From: James Fuller <jim.fuller@xxxxxxxxxxxxxx> Date: Tue, 01 Mar 2005 13:22:20 +0100 |
Hi All!
I have looked through the list and don't seem to find anything that answers my specific question, but if there is... I apologise!
I have an xml file similar to this: <abs:body> <abs:heading class='100' string='test'> <abs:heading class='200' string='tester'></abs:heading> <abs:heading class='300' string='sometext'></abs:heading> <abs:heading class='300' string='somemoretext'></abs:heading> <abs:heading class='200' string='testing'></abs:heading> </abs:heading> </abs:body>
This is the output I would like:
class = 200 string='tester' class = 200 string='testing' class = 300 string='sometext' class = 300 string='somemoretext'
<?xml version="1.0" encoding="UTF-8"?> <abs:body xmlns:abs="http://www.example.org/test"> <abs:heading class="100" string="test"> <abs:heading class="200" string="tester"> <abs:heading class="300" string="sometext"/> <abs:heading class="300" string="somemoretext"/> </abs:heading> </abs:heading> </abs:body>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:abs="http://www.example.org/test" version="1.0"> <xsl:template match="abs:body">
<xsl:apply-templates select="//abs:heading"> <xsl:sort select="@class"/> </xsl:apply-templates>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Ordering my HTML output, Aaron McGrath | Thread | Re: [xsl] Ordering my HTML output, David Carlisle |
[xsl] Ordering my HTML output, Aaron McGrath | Date | Re: [xsl] Ordering my HTML output, David Carlisle |
Month |