Subject: Re: [xsl] How to sort sibling elements based on attribute of child element From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 06 Jul 2009 18:01:12 -0400 |
Assuming this is the case, try
<xsl:template match select="/*"> <xsl:apply-templates select="Annotation[1]/preceding-sibling::*"/> <xsl:apply-templates select="Annotation"> <xsl:sort select="*/@Priority"/> </xsl:apply-templates> <xsl:apply-templates select="Annotation[last()]/following-sibling::*"/> </xsl:template>
<xsl:template match="/*[not(Annotation)]" priority="2"> <xsl:apply-templates/> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to sort sibling eleme, Wendell Piez | Thread | [xsl] DITA Open Toolkit in practice, Michael Hahn |
Re: [xsl] How to sort sibling eleme, Wendell Piez | Date | [xsl] DITA Open Toolkit in practice, Michael Hahn |
Month |