xsl-list
[Top] [All Lists]

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

2008-09-18 19:51:30
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>