Re: [xsl] XPath question

Subject: Re: [xsl] XPath question
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 07 Jun 2006 12:11:42 -0400
At 11:55 AM 6/7/2006, Andrew wrote:
On 6/7/06, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
Chris,

Doesn't your problem reduce to the first c node descendant?

/descendant::c[1]

?

With XSLT 1.0's first item semantics, couldn't you reduce that to:


/descendant::c

If you only wanted the string value, yes.


If you wanted to apply a template to the node or do something else with it, then you need the predicate.

(not that that is a good a idea...)

Yeah, I'm training myself out of relying on this rule as it lapses with XSLT 2.0. IMO the scale has tipped and it's now better always to add the [1].


Cheers,
Wendell

Current Thread