|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath for selecting all text node children?
Ilkka:
The most recent preceding component, not including the component your context node is in, is preceding::component[1] All text node children of it are preceding::component[1]/text() but it sounds like you want preceding::component[1]//text() which is short for preceding::component[position() = 1]/descendent-or-self::node()/child::text() and includes "all text in the preceding component (no matter how the text nodes are nested)". Keep in mind, however, that if you ask for the value of that set of text nodes, you'll get the value only of the first one (since the value of a node set is the value of the set's first node in document order). If you want a string that contains all the text node content of the preceding component, concatenated together, just ask for the value of that node itself (since the value of a node is the concatenation of the values of its text node descendents). So try preceding::component[1] I hope that helps, Wendell At 01:54 PM 8/24/01, you wrote: Hi! ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== 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
|

Cart








