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

Re: xpath versions comparison

Subject: Re: xpath versions comparison
From: "Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Jan 2021 15:01:18 -0000
Re:  xpath versions comparison
> > 1)  XPath 2.0 has introduced sequences,
>
> right, and the nodes are now typed.
>

Thanks, for reminding me about this. That's also a fundamental change
between XPath 1.0 and 2.0/3.1. Interestingly, for the non schema-aware
variant of XPath 2.0, element nodes in the XPath data model carry a type
annotation xs:untyped & attribute nodes carry type annotation
xs:untypedAtomic. For the schema-aware variant of XPath 2.0, element and
attribute nodes carry type annotation as specified in the XML schema with
which the XML instance document was validated; if the XML instance document
(or possibly, discrete element and attribute nodes) is not validated when
working with schema-aware version of XPath 2.0, the corresponding element
and attribute nodes carry the type annotation as if the system is non
schema-aware.

Another aspect about XPath 1.0's data model that I can think now is that,
what does a typical (or any) XPath 1.0 expression can be called in the
XPath data model wrt ordering of nodes represented by the XPath expression.
There are two cases about this described as following,
a) If we don't use the XPath union operator at top level of XPath
expression representing nodes,
In this case, the XPath expression nodes are in the document order. And the
same, is true for XPath 2.0/3.1.
b) If we use an union operator,
In this case, the XPath expression nodes after expansion/evaluation of the
union operator, are unordered. With XPath 2.0/3.1, the union operator
simply juxtaposes/concatenates the individual XPath data model items.

Thanks for reading.


--
Regards,
Mukul Gandhi

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.