xsl-list
[Top] [All Lists]

Re: [xsl] xpath versions comparison

2021-01-02 09:01:26


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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>