[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] why is "(chapter//footnote)[1]" illegal?


Subject: RE: [xsl] why is "(chapter//footnote)[1]" illegal?
From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx>
Date: Sun, 24 Aug 2003 09:03:43 -0400 (EDT)

On Sun, 24 Aug 2003, Michael Kay wrote:

> >   boning up on my predicates and patterns, i'm reading
> > kay, p. 443, which states:
> > 
> >   "(chapter//footnote)[1] is not a valid pattern.  (Why not?
> > No good reason, it's just that the spec doesn't allow it."
> > 
> >   but on p. 408, there is an explanation of the (apparently
> > acceptable) path expression "(chapter/para)[1]".  
> > 
> >   so is it just the difference between using the child axis
> > and the descendant-or-self axis?  it's not obvious to me
> > why the first should be illegal while the second is legal.
> 
> The syntax for patterns is a small subset of the syntax for XPath
> expressions, and the subset doesn't allow parentheses.
> 
> The subset was chosen to make it easy for implementations to test
> whether a node matches a pattern without going through the full
> algorithm of evaluating the expression for every ancestor of the node
> being tested.

i realize by now why i was just being dense.  ever have one of those
days when you just want to take back your last few posts?  argh.
i have *got* to stop drinking decaf.


rday


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords