/
65.txt
317 lines (286 loc) · 9.19 KB
/
65.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
[11] [DFN[XPath 1.0データモデル]]は、 [[XPath 1.0]] が採用している [[XML文書]]の内部表現形式です。
[[XPath 1.0]] の他、 [[XPath 1.0]] を採用する [[XSLT 1.0]] などの言語で使われています。
* DOM XPath のデータモデル
[3] [[Chrome]]、[[Firefox]] とも [CODE(DOMi)@en[[[DocumentType]]]] [[節点]]が存在します。
[CODE(XPathFunction)@en[[[string()]]]] や [CODE(XPathFunction)@en[[[name()]]]]
は[[空文字列]]になります。 [TIME[2013-09-28T13:03:13.400Z]]
[7] [[根節点]]の扱いについては、[[根節点]]の項を参照してください。
* XSLT のデータモデル
[8] [[根節点]]の拡張については、[[根節点]]の項を参照してください。
[4] [CITE@EN[XSL Transformations (XSLT) Version 1.1]] ([TIME[2001-08-24 14:35:28 +09:00]] 版) <http://www.w3.org/TR/xslt11/#N11359>
* XPointer
[9] [[根節点]]の拡張については、[[根節点]]の項を参照してください。
* XForms
[5] [CITE@EN[XForms 1.1]] ([TIME[2010-08-12 22:45:33 +09:00]] 版) <http://www.w3.org/TR/xforms/#expr-instance>
* 変種
[2] [CITE[X Sharp/Data Types]] ([TIME[2009-01-22 20:51:58 +09:00]] 版) <http://wiki.codeglide.com/X_Sharp/Data_Types#Node>
>The X# Document Object Model implementation supports all six XML node types:
- Element
- Attribute
- Text (Unicode and Binary text nodes are permitted)
- Namespace
- Comment
- Processing Instruction
「Binary text nodes」
* 歴史
[12] [[XPath 1.0データモデル]]は、 [[XML情報集合]]の設計上のベースとなった[[データモデル]]の1つです。
[10] [[XPath 2.0]]/[[XSLT 2.0]] 以降は [[XDM]] を使っています。 [[XDM]]
は [[XPath 1.0のデータモデル]]をベースにしているようですが、大きく変更されています。
* 実装
[6] [CITE@en[760029 – XPath expression `//node()` shouldn’t match the DOCTYPE node]]
( ([TIME[2013-11-01 00:08:53 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=760029>
* メモ
[1]
[PRE[
DataModel:
@FullName:
@@lang:en
@@@:
XPath 1.0 Data Model
@ImplNote:
@@lang:en
@@@:
A namespace URI of an expanded-name should be resolved
to an absolute URI reference.
\
{P:: Two expanded-names are equal if:
\
- they have the same local part and
\
- both have a null namespace URI or
both have non-null namespace URIs that are equal.
\
}
@ImplNote:
@@lang:en
@@@:
{LI:: <DFN:document order>:: The order in which the first
character of the XML representation of each node
occurs in the document after expansion of general entities.
\
- The attribute nodes and namespace nodes occur before
the children of the element.
\
- The namespace nodes occur before the attribute nodes.
\
- The relative order of namespace nodes and the attribute nodes
is implementation-dependent.
\
}
\
- <DFN:reverse document order>:: The reverse of document order.
@ImplNote:
@@lang:en
@@@:
- <DFN:descendants>:: The children of the node and
the descendants of the children.
@InfoItem:
@@FullName:
@@@lang:en
@@@@: root node
@@Description:
@@@lang:en
@@@@:
The root of the tree. A root node does not occur except
as the root of the tree.
@@Prop:
@@@Description:
@@@@lang:en
@@@@@: An ordered list of child nodes.
@@Prop:
@@@Name:string-value
@@@Description:
@@@@lang:en
@@@@@:
The concatenation of the <CODE:string-value>s of all
text node descendants of the root node in document order.
@InfoItem:
@@FullName:
@@@lang:en
@@@@:element node
@@InfoProp:
@@@Name:expanded-name
@@@Description:
@@@@lang:en
@@@@@:
Computed by expanding the <CODE:QName> of the element
specified in the tag. The namespace URI will be null
if the <CODE:QName> has no prefix and there is no
applicable default namespace.
@@InfoProp:
@@@Name:children
@@@Description:
@@@@lang:en
@@@@@:
An ordered list of child nodes. Note that entity references
are expanded and character references are resolved.
@@InfoProp:
@@@Name:string-value
@@@Description:
@@@@lang:en
@@@@@:
The concatenation of the <CODE:string-value>s of all
text node descendants in document order.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@: unique identifier
@@@Description:
@@@@lang:en
@@@@@:
The DTD-determined ID value. Note that if an XML processor
reports two elements in a document as having the same unique
ID, the second element in document order must be treated
as not having a unique ID.
@@InfoProp:
@@FullName:
@@@lang:en
@@@@:parent
@InfoItem:
@@FullName:
@@@lang:en
@@@@:attribute node
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:parent
@@@Description:
@@@@lang:en
@@@@@:
The owner element. Note that an attribute node is not
a child of the parent element.
@@ImplNote:
@@@lang:en
@@@@:
Default attributes are treated the same as specified ones.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:expanded-name
@@@Description:
@@@@lang:en
@@@@@:
Computed by expanding the <CODE:QName> specified in the tag.
The namespace URI will be null if the <CODE:QName> does
not have a prefix.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:string-value
@@@Description:
@@@@lang:en
@@@@@:
The normalized value. Note that is might be a zero-length string.
@InfoItem:
@@FullName:
@@@lang:en
@@@@:namespace node
@@Description:
@@@lang:en
@@@@:
In-scope namespace declarations, including implied
<XML:xml> namespace declaration.
\
{NOTE:: An <XML:xmlns=""> attribute undeclares the
default namespace; that element and its
descendants have no default namespace node.
\
}
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:parent
@@@Description:
@@@@lang:en
@@@@@:
The owner element. Note that a namespace node is not a
child of the parent element.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:expanded-name
@@@Description:
@@@@lang:en
@@@@@:
The local part is the namespace prefix or empty if
the namespace node is for the default namespace.
The namespace URI is always null.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:string-value
@@@Description:
@@@@lang:en
@@@@@:
The namespace URI bound to the prefix. If it is a relative
URI, it must be resolved.
@InfoItem:
@@FullName:
@@@lang:en
@@@@:processing instruction node
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:parent
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:expanded-name
@@@Description:
@@@@lang:en
@@@@@:
The local part is the target. The namespace URI is null.
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:string-value
@@@Description:
@@@@lang:en
@@@@@:
The target data (following the target name and any white space).
@InfoItem:
@@FullName:
@@@lang:en
@@@@:comment node
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:parent
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:string-value
@@@Description:
@@@@lang:en
@@@@@:
The content of the comment.
@InfoItem:
@@FullName:
@@@lang:en
@@@@:text node
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:parent
@@InfoProp:
@@@FullName:
@@@@lang:en
@@@@@:string-value
@@@Description:
@@@@lang:en
@@@@@:
The character data, always has at least one character.
]PRE]
[FIG(quote)[
[FIGCAPTION[
[13] [CITE@en[RFC 7950 - The YANG 1.1 Data Modeling Language]]
([TIME[2016-09-15 03:32:37 +09:00]])
<https://tools.ietf.org/html/rfc7950#section-6.4>
]FIGCAPTION]
> The data model used in the XPath expressions is the same as that used
> in XPath 1.0 '''['''XPATH''']''', with the same extension for root node children
> as used by XSLT 1.0 (see Section 3.1 in '''['''XSLT''']'''). Specifically, it
> means that the root node may have any number of element nodes as its
> children.
]FIG]