[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: AW: AW: why is "(chapter//footnote)[1]" illegal?
From: Markus Abt <abt@xxxxxxxx>
Date: Sat, 23 Aug 2003 22:36:11 +0200
chapter footnote
well,

> ----------
> Von: 	Robert P. J. Day
> Gesendet: 	Samstag, 23. August 2003 17:42
> An: 	'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Betreff: 	Re: AW:  why is "(chapter//footnote)[1]" illegal?
> 
> On Sat, 23 Aug 2003, Markus Abt wrote:
> 
> > Hi Robert,
> > 
> > a pattern (p.443) is a path expression, but not every
> > path expression (.p408) is a valid pattern.
> 
> well, since mom is still putzing around in the kitchen and not
> ready to go shopping yet, i'll expand on this a bit more.
> 
> i'm aware (kay, p. 430 -- a book that is getting mighty dog-eared by now)
> that "every pattern is a valid XPath expression, but not every valid XPath
> expression is a valid pattern." fair enough -- kay uses the example of
> "2+2" as an expression that makes no sense as a pattern.
> 
> but that example is pretty obvious -- "2+2" *clearly* can't be
> interpreted as a pattern.  it's not so obvious why the following
> set of expressions can or can't be used as patterns:
> 
>   (chapter/para)[1]		yes (kay, 408)
>   (chapter//footnote)[1]	no (kay, 443)
>   ($chapters//diagram)[1]	yes (kay, 355)

(chapter/para)[1]		no
(chapter//footnote)[1]	no
($chapters//diagram)[1]	no

All three can not be used as patterns.

> it's not at all clear *intuitively* why the first and third expressions
> are acceptable patterns, while the second isn't.  and it's not because
> that 2nd expression couldn't be interpreted unambiguously, AFAICT.
> 
> after i take a closer look at the actual rules for acceptable patterns,
> i'm sure i'll understand it.  but i just won't like it. :-)
> 
> rday
> 

Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.