[12] [DFN[[[XDM]]]] は、 [[XPath 2.0]] 以降と [[XQuery]]、 [[XSLT 2.0]] 
以降が採用している [[XML]] の[[データモデル]]です。

[13] [[XPath 1.0データモデル]]の後継に当たりますが、全面改訂されて大きく異なるものとなっています。

* 代替

[16] [[XML]] の衰退に伴い [[XDM]] もあまり使われていません。
[[Webブラウザー]]は [[XPath 1.0]] と [[XSLT 1.0]] を実装しているため、
[[XDM]] は使っていません。

* 版

[14] [[XDM]] ([[無印]]) は [[XPath 2.0]] / [[XQuery 1.0]] / [[XSLT 2.0]]
が採用しています。

[15] [[XDM 3.0]] は [[XPath 3.0]] / [[XQuery 3.0]] / [[XSLT 3.0]]
が採用しています。

[27] [[XDM 3.1]] は [[XPath 3.1]] / [[XQuery 3.1]] / [[XSLT 3.1]]
が採用しています。

* データ型

[26] [[XDM]] は [[XML Schemaデータ型]]の世界を拡張するような形で規定されています。

[25] [DFN[XPath and XQuery Functions and Operators]] [[仕様書]]で
[[XML Schemaデータ型]]と [[XDM]] の値に対する[[演算]]が規定されています。

;; [[XDM一族]]も参照。

[31] [[XML Schemaデータ型]]および [[XDM一族]]の[[応用]]は、
[[XML Schemaデータ型]]を参照。

[SEE[ 日時処理は[[XML Schema暦]] ]]

* 歴史

[1]
[CITE@en[XQuery 1.0 and XPath 2.0 Data Model (XDM)]] ([CODE[2007-01-23 07:26:51 +09:00]] 版) <http://www.w3.org/TR/2007/REC-xpath-datamodel-20070123/>
([[名無しさん]] [WEAK[2007-01-27 05:01:03 +00:00]])

[2]
[CITE@en[XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition)]] ([TIME[2009-04-21 05:30:00 +09:00]] 版) <http://www.w3.org/TR/2009/PER-xpath-datamodel-20090421/>

[3] [CITE@en[XQuery and XPath Data Model 1.1]]
([TIME[2009-12-15 03:50:45 +09:00]] 版)
<http://www.w3.org/TR/2009/WD-xpath-datamodel-11-20091215/>

[4] [CITE@en[XQuery and XPath Data Model 3.0]]
( ([TIME[2010-12-17 05:08:56 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-xpath-datamodel-30-20101214/>

[5] [CITE@en[XQuery and XPath Data Model 3.0]]
( ([TIME[2010-12-17 05:08:56 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-xpath-datamodel-30-20101214/>

[6] [CITE@EN[XPath and XQuery Functions and Operators 3.0]]
( ([TIME[2010-12-17 05:09:03 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-xpath-functions-30-20101214/>

[7] [CITE@en[XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition)]]
( ([TIME[2010-12-17 00:06:35 +09:00]] 版))
<http://www.w3.org/TR/2010/REC-xpath-datamodel-20101214/>

[8] [CITE@en[XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)]]
( ([TIME[2010-12-17 00:08:20 +09:00]] 版))
<http://www.w3.org/TR/2010/REC-xslt-xquery-serialization-20101214/#xslt20>

[9] [CITE@en[XQuery and XPath Data Model 3.0]]
( ([TIME[2013-10-22 14:27:49 +09:00]] 版))
<http://www.w3.org/TR/2013/PR-xpath-datamodel-30-20131022/>

[10] [CITE@en[XQuery and XPath Data Model 3.0]]
( ([TIME[2014-04-08 07:00:06 +09:00]] 版))
<http://www.w3.org/TR/2014/REC-xpath-datamodel-30-20140408/>

[11] [CITE@en[XQuery and XPath Data Model 3.0]]
( ([TIME[2014-04-08 07:00:06 +09:00]] 版))
<http://www.w3.org/TR/xpath-datamodel-3/>

[17] [CITE@en[XQuery and XPath Data Model 3.1]]
([TIME[2014-12-18 07:34:29 +09:00]] 版)
<https://www.w3.org/TR/2014/CR-xpath-datamodel-31-20141218/>

[18] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2014-12-18 06:45:18 +09:00]] 版)
<https://www.w3.org/TR/2014/CR-xpath-functions-31-20141218/>

[FIG(quote)[
[FIGCAPTION[
[19] [CITE@en[XProc 2.0: An XML Pipeline Language]]
([TIME[2016-07-21 14:35:49 +09:00]])
<https://www.w3.org/TR/2016/NOTE-xproc20-20160721/#xml-documents>
]FIGCAPTION]

> In order to be consistent with the XPath data model, all general and external parsed entities must be fully expanded in XML documents; they must not contain any representation of '''['''Infoset''']''' '''['''unexpanded entity reference information items''']'''.

]FIG]


[20] [CITE@en[XQuery and XPath Data Model 3.1]]
([TIME[2016-12-13 15:58:36 +09:00]])
<https://www.w3.org/TR/2016/CR-xpath-datamodel-31-20161213/>

[21] [CITE@en[XQuery and XPath Data Model 3.1]]
([TIME[2017-01-17 02:21:59 +09:00]])
<https://www.w3.org/TR/2017/PR-xpath-datamodel-31-20170117/>

[22] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-01-17 02:46:52 +09:00]])
<https://www.w3.org/TR/2017/PR-xpath-functions-31-20170117/>

[23] [CITE@en[XQuery and XPath Data Model 3.1]] ([TIME[2017-03-20 07:26:25 +09:00]]) <https://www.w3.org/TR/2017/REC-xpath-datamodel-31-20170321/>

[24] [CITE@EN[XPath and XQuery Functions and Operators 3.1]]
([TIME[2017-03-21 16:02:06 +09:00]])
<https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/>

[FIG(quote)[
[FIGCAPTION[
[28] [CITE@EN[XSL Transformations (XSLT) Version 3.0]]
([TIME[2017-06-06 21:59:56 +09:00]])
<https://www.w3.org/TR/2017/REC-xslt-30-20170608/#xdm-versions>
]FIGCAPTION]

> XSLT 3.0 requires a processor to support XDM 3.0 as defined in '''['''XDM 3.0''']''', augmented with support for maps as described in 21 Maps.
> A processor may also provide a user option to support XDM 3.1 as defined in '''['''XDM 3.1''']''', in which case it must do so as defined in 27.7 XPath 3.1 Feature.
> Note:
> The essential differences between XDM 3.0 (with the extensions defined in this specification) and XDM 3.1 are that XDM 3.1 adds support for arrays, and for the xs:numeric union type.
> A processor may also provide a user option to support versions of XDM later than 3.1, in which case the way it does so is implementation-defined.

]FIG]


[FIG(quote)[
[FIGCAPTION[
[29] [CITE@EN[XSL Transformations (XSLT) Version 3.0]]
([TIME[2017-06-06 21:59:56 +09:00]])
<https://www.w3.org/TR/2017/REC-xslt-30-20170608/#uca-collations>
]FIGCAPTION]

> The description of the Unicode Collation Algorithm in this section is technically identical to the description found in '''['''XPath 3.1''']'''. The description here is to be used by a processor that does not implement the XPath 3.1 Feature; if the processor does implement the XPath 3.1 Feature, the description in '''['''XPath 3.1''']''' applies.

]FIG]


[FIG(quote)[
[FIGCAPTION[
[30] [CITE@EN[XSL Transformations (XSLT) Version 3.0]]
([TIME[2017-06-06 21:59:56 +09:00]])
<https://www.w3.org/TR/2017/REC-xslt-30-20170608/#map>
]FIGCAPTION]

> The extensions to XPath 3.0 defined in this section have been incorporated into XPath 3.1. Therefore, when an XSLT 3.0 processor implements the XPath 3.1 Feature, the relevant parts of this section can be ignored.

]FIG]


[32] [CITE[RIF Datatypes and Built-Ins 1.0 (Second Edition)]]
([TIME[2017-10-02 19:47:14 +09:00]])
<https://www.w3.org/TR/2013/REC-rif-dtb-20130205/>

[33] 
[[XDM]] も巨大仕様ですごい労力を費やしているのに、
誰も使っていないというのは悲惨だよなー。
せめて作った人達くらいは使えばいいのに、
今頃何をしてるんだろうか。

[34] 
無理に時代に迎合しようとして [[JSON]]
対応とかやってたのも無駄だったか。

[35] 
未だ頑張ってるのは [[XForms]] くらい? あれが [[XDM]]
なのかどうかいまいちわからんが。