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

Re: need clarifications on XPath vs pattern match

  • From: Lisa Rein <lisarein@f...>
  • To: Michael Fuller <msf@m...>
  • Date: Mon, 13 Dec 1999 17:11:03 -0800

xpath match pattern
okay so is the conclusion of all of this is that:

1) XSLT's patterns MUST be XPath expressions  

and also

2) I was WRONG when I said that was not the case earlier because:

Even when the value of a simple match pattern is nothing more than an
element name, that in itself is an XPath expression (being evaluated
from the root element, by default -- unless another context is
explicitly stated somewhere in the stylesheet).

I just want to make sure that this is a done deal.  It's a pretty big
issue for there to be confusion about, if ya think about it. When I
realized I couldn't say "yes" or "no" without thinking for a minute, I
was a bit surprised.  It should be a simple question with a simple yes
or no answer. This isn't one of those gray areas, is it?

With all that in mind, I ask again to the group:  
Are we all in agreement here?  (with the above statements 1 & 2 above)

Just checking :-)

thanks,

lisa

Michael Fuller wrote:
> 
> Didier PH Martin wrote [re. XSLT patterns vs XPath expressions]:
> > so, it seems that it is not the full set but it is a subset of XPath as
> > long as the expression points to an object of type "node-set".
> 
> Not quite. See XSLT, section 5.2:
>     "A pattern must match the grammar for Pattern. A Pattern is a set of
>     location path patterns separated by |. A location path pattern is a
>     location path whose steps all use only the child or attribute axes.
>     Although patterns must not use the descendant-or-self axis, patterns
>     may use the // operator as well as the / operator. Location path
>     patterns can also start with an id or key function call with a literal
>     argument.  Predicates in a pattern can use arbitrary expressions just
>     like predicates in a location path."
> 
> This paragraph is followed by a grammar spelling out the above.
> See also XPath, section 2 "Location Paths".
> 
> > I guess that node-set will be defined in the information set specification.
> > Are they, Will they? OK now I have a new problem: where a node-set is defined?
> 
> "Node-sets" are defined in XPath, section 3.3:
>     "A location path can be used as an expression. The expression returns
>     the set of nodes selected by the path."
> 
> > Yop, I was feeling better in bed this morning :-))
> 
> Me too.
> 
> Bottom line: you can't fully understand the XSLT spec. w/o first
> understanding XPath. (Arguably, the reverse is true also. ;-)
> 
> Michael
> --
> http://www.mds.rmit.edu.au/~msf/
> Multimedia Databases Group, RMIT, Australia.
> 
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@i... the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@i... the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@i...)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.