[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Selecting first descendant text node

Subject: RE: Selecting first descendant text node
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sat, 12 Jan 2002 23:38:41 -0000
descendant text
> >>So, how do I select the first (in document order) of all of the
> >>descendant text nodes of an element?
> >
> >(item//text())[1] should do that.
> Probably the expression is correct for XPath, but my XSLT
> processor (as
> mentioned, Xalan 2.1.0) reports an parse/expression error if
> I put this
> into the match attribute. Is this a bug of that processor?
It's a valid expression but not a valid pattern. The match attribute of
xsl:template expects a pattern.

If you really want to write a pattern that matches any text node that is the
first descendant text node of an item, you can write it as


But I wouldn't; I would find a different way of solving the problem.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.