[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Matching only text nodes with certain (complicated) properties


Subject: Re: [xsl] Matching only text nodes with certain (complicated) properties
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 09 Jan 2009 19:07:06 +0100

David B?rgin wrote:

<xsl:template match="body//text()[preceding::text()[normalize-space()][1] &lt;&lt; preceding::pb[1]]">
<span class="pagenumber">page <xsl:value-of select="preceding::pb[1]/@n"/></span>
<xsl:apply-templates/>
</xsl:template>

I think you only want to apply that template to text nodes containing non-whitespace characters e.g.


<xsl:template match="body//text()[normalize-space()][preceding::text()[normalize-space()][1] &lt;&lt; preceding::pb[1]]">

--

	Martin Honnen
	http://JavaScript.FAQTs.com/


Current Thread