[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: [Fwd: Text from mixed content but not all embedded
Subject: Re: [Fwd: Text from mixed content but not all embedded elements]
From: Andy Black <andy_black@xxxxxxx>
Date: Wed, 11 Mar 2009 14:58:06 -0700
|
Thank you Michael and David.
It works just right (and seems so obvious now... blush).
--Andy
On 3/11/2009 2:33 PM, Michael Kay wrote:
Use the standard XSLT coding pattern: for each element, write a template
rule that recurses downwards to process its children. Except when you don't
want to process the children:
<xsl:template match="secTitle">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="endNote"/>
In fact, the only rule you need explicitly is the one for endNote; for all
the other nodes, the default built-in template rule does the right thing.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Andy Black [mailto:andy_black@xxxxxxx]
Sent: 11 March 2009 21:25
To: XSL List
Subject: [Fwd: Text from mixed content but not all
embedded elements]
I have a situation with an XML portion like the following:
<secTitle>Complements of <langData lang="lVernacular">le'e</langData>
and other arguments<endnote id="nhabby">
<p>We wish to thank those who helped us.</p> </endnote>
</secTitle>
Using XSLT 1.0, I want to output the text of all but what is in the
embedded <endnote> element. That is, the text output I want is
Complements of le'e and other arguments
I know that if I use <xsl:copy-of select="text()"/> I can get
all of the
text nodes, but I want to limit it to all but what is within the
<endnote> element.
Is there a way to do this in XSLT 1.0?
Thanks,
--Andy
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|