XPath(1.0、2.0、3.1)版本之间有什么区别 [英] What are the differences between versions of XPath (1.0, 2.0, 3.1)

查看:69
本文介绍了XPath(1.0、2.0、3.1)版本之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主要区别是什么?我找不到任何完整的文章.我只知道那组功能已经扩展了–例如日期、时间等

What are the main differences? I couldn't find any complete article. I know only that set of the functions has been extended – e.g date, time etc.

推荐答案

确实很难找到完整详尽的更改列表或重要差异的可读摘要.

It is indeed difficult to find either a complete exhaustive list of changes, or a readable summary of the important differences.

1.0 和 2.0 之间最显着的区别在于数据模型和类型系统,特别是转向了一个模型,其中一切都是一个项目序列,其中项目可以是原子值或节点;加上基于 XSD(XML 模式)内置类型的许多不同类型的原子值的引入.大多数语法扩展和函数库扩展都可以看作是用一组操作充实新类型以使其有用.总体而言,该语言增长了 2 到 10 倍,具体取决于您在 1.0 和 2.0 之间衡量它的方式,因此列出这些更改很困难也就不足为奇了.

Between 1.0 and 2.0 the most significant differences are in the data model and type system, in particular the move to a model where everything is a sequence of items, in which items can be either atomic values or nodes; plus the introduction of many different types of atomic values, based on the XSD (XML Schema) built-in types. Most of the syntax extensions and extensions to the function library can be seen as fleshing out the new types with a set of operations to make them useful. Overall, the language grew by a factor of 2 to 10 depending how you measure it between 1.0 and 2.0, so it's not surprising that listing the changes is difficult.

在 2.0 和 3.1 之间的变化更为温和.各种规范的变更日志是一个很好的起点:

Between 2.0 and 3.1 the changes are more modest. The Change Logs of the various specifications are a good place to start:

https://www.w3.org/TR/xpath-31/#id-revision-log

https://www.w3.org/TR/2014/REC-xpath-30-20140408/#id-revision-log

https://www.w3.org/TR/xpath-functions-31/#changelog

https://www.w3.org/TR/xpath-functions-30/#changelog

3.1 中最重要的新增功能是支持映射和数组,因此也支持 JSON.

The most significant addition in 3.1 is support for maps and arrays, and hence JSON.

这篇关于XPath(1.0、2.0、3.1)版本之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆