[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Matching only text nodes with certain (complicated
To all those who've replied,
with your help the original problem has been resolved, thank you! The template in its (provisional) working form is: <xsl:template match="body//text()[normalize-space()][preceding::text()[normalize-space()][1] << preceding::pb[1]]"> <span class="pagenumber">page <xsl:value-of select="preceding::pb[1]/@n"/></span> <xsl:copy-of select="."/> </xsl:template> The matched text node must of course appear in the XHTML. For this purpose I changed the useless <xsl:apply-templates/> instruction to a copy-of instruction (since the matched text node will never contain elements etc.). Wendell, the whitespace handling is an issue I'm going to consider very soon and I'll think of your strip-space hint, thanks. David B|rgin
|
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
|