xsl-list
[Top] [All Lists]

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

2009-01-09 13:07:36
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--