xsl-list
[Top] [All Lists]

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

2008-09-17 06:09:14
2008/9/17 David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>:

its just a quirk of the way // currently works that you can do //@* at
all....isn't it?


Not really, one may argue whether the current design is good or bad, but
//@* working isn't a "quirk" or that design. It was almost certianly a
major input to the current design that that should work.


Really - even though it implies attributes are descendants and that
the attribute axis is available from node()s?

It looks like:

/foo/bar

expands to

/child:foo/child:bar

so // had to expand to

descendant-of-self::node()

so //@* works as a side-effect of that - a happy accident if you like.

I wonder how we should approach //@* - is it less effective than
//*/@* because it gets non-element nodes, or does it come under the
category of those things to leave to the processor.

It remind me of the identity template - calling apply-templates when
matching an attribute - no big deal, but not exactly good either.


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>