How to select text only for element with mixed content?
I was wondering if there are any kind folks who might wish to help a newbie with this problem. I have an element whose content model is comprised of child elements as well as cdata. The child elements in turn contain cdata (and possibly children of their own).
<Tag1> <Tag2> <Tag2.1>Text for Tag2.1</Tag2.1> This is text for Tag2 </Tag2>
<Tag3>This is text for Tag3</Tag3>
This is text for Tag1 </Tag1>
Assuming I have a template for Tag1 in an XSL stylysheet, and I am currently processing that template, I wish to extract only the text for Tag1 (and not the pcdata for the children). i.e.: "This is text for Tag1
If I use <xsl:value-of>, I get all of the text (pcdata) for all the children.
Is there a way of getting only the text for the current tag without having to write a seperate template?
Thank you in advance.
A ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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