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
--~------------------------------------------------------------------
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>
--~--