Page 1 of 1

Not outputting embedded node

Posted: Thu Apr 23, 2009 10:57 am
by DerekLewis
I’m new to the forum and XSLT, so please excuse me if this question is silly or has been answered before.

In generating (say) html output from an XML document using an xsl stylesheet, how can I output the text ([...]) in <anynode> but excluding the text in <fw> in the following?

<anynode>
[...]
<fw> [...] </fw>
[...]
</anynode>

I want to extract and output only the text of anynode which surrounds the (unwanted) text in <fw>. You may have gathered, <fw> stands for forme work in a printed text and and can appear at any position within any other node in the document.

So far, my only solution is to make a copy of the XML file, removing the unwanted node completely, but I feel there should be a simpler way.

Derek