[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Matching only text nodes with certain (complicated

Subject: Re: Matching only text nodes with certain (complicated) properties
From: "David B?rgin" <david.buergin@xxxxxxxxxxxxx>
Date: Fri, 09 Jan 2009 20:56:39 +0100
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] &lt;&lt; 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.