|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Ordering my HTML output
Aaron McGrath wrote:
Hi All! if i understand correctly taken the following xml (note I assumed the encapsulation...couldnt really understand in your email) <?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>with this xsl <?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></xsl:template> <xsl:template match="abs:heading"> class = <xsl:value-of select="@class"/> string='<xsl:value-of select="@string"/>' </xsl:template> </xsl:stylesheet> will give u part of the solution...note the usage of <xsl:sort/>... if u want to omit something from processing just add a matching template which prints out nothing <xsl:template match="abs:heading[@class='somevalue']"></xsl:template> note u must supply the somevalue hth, Jim Fuller
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








