xsl-list
[Top] [All Lists]

[xsl] xpath versions comparison

2021-01-02 00:00:16
Hi all,
    As we all know, currently we've following versions of XPath language:
1.0, 2.0 & 3.1.

I've been trying to think that, what are the major differences between the
above mentioned XPath versions. Below are my thoughts,

1) Since XPath 2.0, the XPath data model has fundamentally changed as
compared to XPath 1.0. XPath 2.0 has introduced sequences, with every
instance of XPath 2.0 data model being a sequence (XPath 2.0 sequence is an
ordered list of nodes and the atomic values. It could be all nodes, all
atomic values, or nodes plus atomic values within the XPath sequence).
Now, XPath 2.0 spec has an associated XPath 2.0 F&O (functions and
operators) spec, which wasn't the case with XPath 1.0. The XPath 2.0 F&O
spec, describes lot more XPath library functions as compared to XPath 1.0.

2) The fundamental data structure of XPath 3.1 data model is a sequence
(same as that with XPath 2.0). The XPath 3.0 data model, has introduced
function items (an XPath data model item. An XPath 2/3 sequence, is a list
of items. An XPath item has node and atomic value as child.). A function
item is a function definition. XPath 3.1 data model has also introduced map
and array data structures, with needed functions in XPath 3.1 F&O specs.
This is one of the huge innovations in XPath 3.1. The XPath 3.1 F&O spec is
even vast as compared to XPath 2.0.

Now we can see, XPath 4.0 spec being developed by W3C, to make the upcoming
new XPath language more versatile that also can have XSLT 4.0 (and possible
XQuery's new version) as its host language. I personally like these
developments to XPath, XSLT & XQuery languages.


Any thoughts, about above mentioned XPath language summary?



--
Regards,
Mukul Gandhi

(earlier, gandhi(_dot_)mukul(_at_)gmail(_dot_)com)
--~----------------------------------------------------------------
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>