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

RE: Question about XPath 2.0


question about xpath operators
> I was just glancing at XPath 2.0 (after a long time !!), I 
> find a "ForExpr" as part of XPath 2.0.  This was surprising, 
> can you provide me a reasoning behind this?

XPath is an expression language over the data model. The data model is
based on sequences. The core operator on sequences is a mapping operator
that applies a function to each item in a sequence to produce a new
sequence. This mapping operator is implemented in XPath in the form of
the "for" expression. Without the ability to map sequences, XPath would
be very limited in its ability to manipulate values in the data model. 

I'm not convinced that we have actually got the For expression right -
it's designed as a subset of the XQuery FLWR expression, whereas
arguably a mapping operator designed specifically for XPath would look
rather different. But the functionality is definitely needed.

> 
> My reasoning: I was under the impression that XPath will 
> provide expressions that will allow us to get nodes and 
> values from XML documents, I thought this will be serve as 
> the basis for most operations on XML. I felt XQuery/XSLT etc 
> can sit on top of XPath.
> 

Not all XPath users will be using it within XSLT or XQuery, and in any
case, in you don't want to have to keep calling back from XPath
expressions to execute XSLT functions.

Michael Kay


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.