[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] html subsection headers xpath
I'm trying to select all the <h4> elements under the current <h3> element, in a document which otherwise doesn't have any useful structure. This template selects <h4> elements following the current <h3> element: <xsl:template match="h3"> <fieldset class="collapsible"> <legend><xsl:value-of select="normalize-space(.)"/></legend> <xsl:apply-templates select="following::h4"/> </fieldset> </xsl:template> How do I limit to <h4> elements following the current <h3> element, up until the next <h3> element? I assume I can generalize to: "select <h4> elements following the current <h3> element, up until the next <h3>, <h2> or <h1> element" Much thanks, Jack
|
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
|