xsl-list
[Top] [All Lists]

Re: [xsl] Semantics of "match"

2014-02-03 09:37:57

On 3 Feb 2014, at 14:58, Wendell Piez <wapiez(_at_)wendellpiez(_dot_)com> wrote:

Hi,

On Sun, Feb 2, 2014 at 10:54 PM, Graydon <graydon(_at_)marost(_dot_)ca> wrote:
3.0 allows more axis references in template matches than 2.0 did; 2.0 is
child and attribute only, 3.0 allows descendant.  (I think it allows all
ForwardAxis axises.)

So

<xsl:template match="descendant::*"/>

is a legal match attribute value.

Leaving any use of except or intersect or union out of it for now just
what does that match mean?

descendant::* matches any element that is a descendant of anything. Which is 
not very useful.

But section/descendant::text()[1] matches the first descendant text node of a 
section element, which starts to look quite handy.


If this holds for 3.0 (and mind you it doesn't, quite), then
match="following-sibling::li" would match every 'li' in your document
except first children of their respective parents.


We're not allowing the sibling axes in patterns, only the complete set of 
downward axes.

Michael Kay
Saxonica


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