Subject: Re: [xsl] xpath versions comparison From: "Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 2 Jan 2021 15:01:18 -0000 |
> > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath versions comparison, Liam R. E. Quin liam | Thread | [xsl] XSLT repetition constructs co, Mukul Gandhi mukulg@ |
Re: [xsl] xpath versions comparison, Liam R. E. Quin liam | Date | [xsl] XSLT repetition constructs co, Mukul Gandhi mukulg@ |
Month |