Re: [xsl] // expanding to descendant-or-self::node()

Subject: Re: [xsl] // expanding to descendant-or-self::node()
From: Evan Lenz <evan@xxxxxxxxxxxx>
Date: Thu, 18 Sep 2008 16:50:53 -0700
Michael Kay wrote:
I'm not aware of and can't think of any reason why "//" is defined the way it is other than so that //@* will work. Can you think of any?

It's possible that someone thought it would be a really good idea if //p[1] meant "every paragraph that is the first child of its parent"; but I have no evidence for this, and if they did, then with hindsight they were probably wrong.

LOL. Another "really good idea" was to make sure that self::* never selects attributes, and introducing the concept of "principal node type" to ensure that.

Just kidding. I think this was another unfortunate side effect, but not nearly as bad as //p[1], or as David pointed out, the confusion surrounding the != operator.

Evan

Current Thread