1 |
wakaba |
1.1 |
Module: |
2 |
|
|
@QName: MDOM|XDP |
3 |
|
|
@enFN: |
4 |
|
|
XDP DOM |
5 |
|
|
@enDesc: |
6 |
|
|
The <DFN::XDP>, <DFN::XML DTD Physical Structure DOM> |
7 |
|
|
provides facility to compose XML DTD with its physical |
8 |
|
|
structure. |
9 |
|
|
|
10 |
|
|
@Namespace: |
11 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XDP/ |
12 |
|
|
|
13 |
|
|
@DISCore:author: DISCore|Wakaba |
14 |
|
|
@License: license|Perl+MPL |
15 |
|
|
@Date: |
16 |
wakaba |
1.12 |
$Date: 2006/12/30 08:27:46 $ |
17 |
wakaba |
1.1 |
|
18 |
|
|
@Require: |
19 |
|
|
@@Module: |
20 |
|
|
@@@QName: Markup|common |
21 |
|
|
@@Module: |
22 |
|
|
@@@QName: MDOM|TreeCore |
23 |
|
|
|
24 |
|
|
Namespace: |
25 |
|
|
@atom: |
26 |
|
|
http://www.w3.org/2005/Atom |
27 |
|
|
@c: |
28 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core# |
29 |
|
|
@cfg: |
30 |
|
|
http://suika.fam.cx/www/2006/dom-config/ |
31 |
|
|
@dis: |
32 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis-- |
33 |
|
|
@doc: |
34 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/7/tutorial# |
35 |
|
|
@d: |
36 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/xdt# |
37 |
|
|
@DOMMain: |
38 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/main# |
39 |
wakaba |
1.9 |
@domperl: |
40 |
|
|
http://suika.fam.cx/~wakaba/archive/2006/dom/perl/ |
41 |
wakaba |
1.1 |
@dx: |
42 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException# |
43 |
|
|
@ecore: |
44 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/Core/ |
45 |
|
|
@f: |
46 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/feature# |
47 |
|
|
@fe: |
48 |
|
|
http://suika.fam.cx/www/2006/feature/ |
49 |
|
|
@html: |
50 |
|
|
http://www.w3.org/1999/xhtml |
51 |
|
|
@idl: |
52 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/IDL# |
53 |
|
|
@kwd: |
54 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/rfc2119/ |
55 |
|
|
@lang: |
56 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang# |
57 |
|
|
@license: |
58 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/license# |
59 |
|
|
@ManakaiDOM: |
60 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom# |
61 |
|
|
@Markup: |
62 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup# |
63 |
|
|
@mat: |
64 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup/Atom/ |
65 |
|
|
@MDOM: |
66 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM. |
67 |
|
|
@MDOMX: |
68 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception# |
69 |
|
|
@dlp: |
70 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Perl# |
71 |
|
|
@rel: |
72 |
|
|
http://www.iana.org/assignments/relation/ |
73 |
|
|
@s: |
74 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Markup# |
75 |
|
|
@tc: |
76 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/ |
77 |
|
|
@td: |
78 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Document/ |
79 |
|
|
@te: |
80 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/ |
81 |
|
|
@test: |
82 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Test# |
83 |
|
|
@trv: |
84 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Traversal/ |
85 |
|
|
@tx: |
86 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/ |
87 |
|
|
@urigen: |
88 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/URI/Generic/ |
89 |
|
|
@xdp: |
90 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XDP/ |
91 |
|
|
@xml: |
92 |
|
|
http://www.w3.org/XML/1998/namespace |
93 |
|
|
|
94 |
|
|
ElementTypeBinding: |
95 |
|
|
@Name: CODE |
96 |
|
|
@ElementType: |
97 |
|
|
dis:ResourceDef |
98 |
|
|
@ShadowContent: |
99 |
|
|
@@DISCore:resourceType: dlp|BlockCode |
100 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
101 |
|
|
|
102 |
|
|
ElementTypeBinding: |
103 |
|
|
@Name: Method |
104 |
|
|
@ElementType: |
105 |
|
|
dis:ResourceDef |
106 |
|
|
@ShadowContent: |
107 |
|
|
@@DISCore:resourceType: DISLang|Method |
108 |
|
|
|
109 |
|
|
ElementTypeBinding: |
110 |
|
|
@Name: Param |
111 |
|
|
@ElementType: |
112 |
|
|
dis:ResourceDef |
113 |
|
|
@ShadowContent: |
114 |
|
|
@@DISCore:resourceType: DISLang|MethodParameter |
115 |
|
|
|
116 |
|
|
ElementTypeBinding: |
117 |
|
|
@Name: Return |
118 |
|
|
@ElementType: |
119 |
|
|
dis:ResourceDef |
120 |
|
|
@ShadowContent: |
121 |
|
|
@@DISCore:resourceType: DISLang|MethodReturn |
122 |
|
|
|
123 |
|
|
ElementTypeBinding: |
124 |
|
|
@Name: Attr |
125 |
|
|
@ElementType: |
126 |
|
|
dis:ResourceDef |
127 |
|
|
@ShadowContent: |
128 |
|
|
@@DISCore:resourceType: DISLang|Attribute |
129 |
|
|
|
130 |
|
|
ElementTypeBinding: |
131 |
|
|
@Name: CAttr |
132 |
|
|
@ElementType: |
133 |
|
|
dis:ResourceDef |
134 |
|
|
@ShadowContent: |
135 |
|
|
@@DISCore:resourceType: DISLang|Attribute |
136 |
wakaba |
1.11 |
@@ForCheck:ManakaiDOM|ForClass |
137 |
wakaba |
1.1 |
|
138 |
|
|
ElementTypeBinding: |
139 |
|
|
@Name: Get |
140 |
|
|
@ElementType: |
141 |
|
|
dis:ResourceDef |
142 |
|
|
@ShadowContent: |
143 |
|
|
@@DISCore:resourceType: DISLang|AttributeGet |
144 |
|
|
|
145 |
|
|
ElementTypeBinding: |
146 |
|
|
@Name: Set |
147 |
|
|
@ElementType: |
148 |
|
|
dis:ResourceDef |
149 |
|
|
@ShadowContent: |
150 |
|
|
@@DISCore:resourceType: DISLang|AttributeSet |
151 |
|
|
|
152 |
|
|
ElementTypeBinding: |
153 |
|
|
@Name: nullCase |
154 |
|
|
@ElementType: |
155 |
|
|
dis:ResourceDef |
156 |
|
|
@ShadowContent: |
157 |
|
|
@@DISCore:resourceType: ManakaiDOM|InCase |
158 |
|
|
@@Value: |
159 |
|
|
@@@is-null:1 |
160 |
|
|
|
161 |
|
|
ElementTypeBinding: |
162 |
|
|
@Name: PerlDef |
163 |
|
|
@ElementType: |
164 |
|
|
dis:Def |
165 |
|
|
@ShadowContent: |
166 |
|
|
@@ContentType: lang|Perl |
167 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
168 |
|
|
|
169 |
|
|
ElementTypeBinding: |
170 |
|
|
@Name: PerlCDef |
171 |
|
|
@ElementType: |
172 |
|
|
dis:Def |
173 |
|
|
@ShadowContent: |
174 |
|
|
@@ContentType: lang|Perl |
175 |
|
|
|
176 |
|
|
ElementTypeBinding: |
177 |
|
|
@Name: enImplNote |
178 |
|
|
@ElementType: |
179 |
|
|
dis:ImplNote |
180 |
|
|
@ShadowContent: |
181 |
|
|
@@lang:en |
182 |
|
|
|
183 |
|
|
ElementTypeBinding: |
184 |
|
|
@Name: enFN |
185 |
|
|
@ElementType: |
186 |
|
|
dis:FullName |
187 |
|
|
@ShadowContent: |
188 |
|
|
@@lang:en |
189 |
|
|
|
190 |
|
|
ElementTypeBinding: |
191 |
|
|
@Name: IFClsETDef |
192 |
|
|
@ElementType: |
193 |
|
|
dis:ResourceDef |
194 |
|
|
@ShadowContent: |
195 |
|
|
@@DISCore:resourceType: |
196 |
|
|
@@@@: dis|MultipleResource |
197 |
|
|
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
198 |
|
|
@@resourceFor: ManakaiDOM|ForIF |
199 |
|
|
@@resourceFor: ManakaiDOM|ForClass |
200 |
|
|
@@resourceFor: s|ForML |
201 |
|
|
|
202 |
|
|
@@DISCore:resourceType: |
203 |
|
|
@@@@: DISLang|Interface |
204 |
|
|
@@@ForCheck: ManakaiDOM|ForIF |
205 |
|
|
|
206 |
|
|
@@DISCore:resourceType: |
207 |
|
|
@@@@: DISLang|Class |
208 |
|
|
@@@ForCheck: ManakaiDOM|ForClass |
209 |
wakaba |
1.11 |
|
210 |
wakaba |
1.1 |
@@Implement: |
211 |
wakaba |
1.11 |
@@@@: ||+||ManakaiDOM|ForIF |
212 |
wakaba |
1.1 |
@@@ContentType: DISCore|TFPQNames |
213 |
wakaba |
1.11 |
@@@ForCheck: ManakaiDOM|ForClass |
214 |
wakaba |
1.1 |
|
215 |
|
|
@@s:elementType: |
216 |
|
|
@@@@: ||+||s|ForML |
217 |
|
|
@@@ContentType: DISCore|TFPQNames |
218 |
|
|
@@@DISCore:stopISARecursive:1 |
219 |
|
|
|
220 |
|
|
@@DISCore:resourceType: |
221 |
|
|
@@@@: s|ElementType |
222 |
|
|
@@@ForCheck: s|ForML |
223 |
|
|
|
224 |
|
|
@@f:implements: XDPFeature30 |
225 |
|
|
|
226 |
|
|
ElementTypeBinding: |
227 |
|
|
@Name: IFClsDef |
228 |
|
|
@ElementType: |
229 |
|
|
dis:ResourceDef |
230 |
|
|
@ShadowContent: |
231 |
|
|
@@DISCore:resourceType: |
232 |
|
|
@@@@: dis|MultipleResource |
233 |
|
|
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
234 |
|
|
@@resourceFor: ManakaiDOM|ForIF |
235 |
|
|
@@resourceFor: ManakaiDOM|ForClass |
236 |
|
|
|
237 |
|
|
@@DISCore:resourceType: |
238 |
|
|
@@@@: DISLang|Interface |
239 |
|
|
@@@ForCheck: ManakaiDOM|ForIF |
240 |
|
|
|
241 |
|
|
@@DISCore:resourceType: |
242 |
|
|
@@@@: DISLang|Class |
243 |
|
|
@@@ForCheck: ManakaiDOM|ForClass |
244 |
wakaba |
1.12 |
|
245 |
wakaba |
1.1 |
@@Implement: |
246 |
wakaba |
1.11 |
@@@@: ||+||ManakaiDOM|ForIF |
247 |
wakaba |
1.1 |
@@@ContentType: DISCore|TFPQNames |
248 |
wakaba |
1.11 |
@@@ForCheck: ManakaiDOM|ForClass |
249 |
wakaba |
1.1 |
|
250 |
|
|
@@f:implements: XDPFeature30 |
251 |
|
|
|
252 |
|
|
ElementTypeBinding: |
253 |
|
|
@Name: IFQName |
254 |
|
|
@ElementType: |
255 |
|
|
dis:QName |
256 |
|
|
@ShadowContent: |
257 |
|
|
@@ForCheck: ManakaiDOM|ForIF |
258 |
|
|
|
259 |
|
|
ElementTypeBinding: |
260 |
|
|
@Name: ClsQName |
261 |
|
|
@ElementType: |
262 |
|
|
dis:QName |
263 |
|
|
@ShadowContent: |
264 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
265 |
|
|
|
266 |
|
|
ElementTypeBinding: |
267 |
|
|
@Name: ETRQName |
268 |
|
|
@ElementType: |
269 |
|
|
dis:QName |
270 |
|
|
@ShadowContent: |
271 |
|
|
@@ForCheck: s|ForML |
272 |
|
|
|
273 |
|
|
ElementTypeBinding: |
274 |
|
|
@Name: ETQName |
275 |
|
|
@ElementType: |
276 |
|
|
dis:AppName |
277 |
|
|
@ShadowContent: |
278 |
|
|
@@ForCheck: s|ForML |
279 |
|
|
@@ContentType: DISCore|QName |
280 |
|
|
|
281 |
|
|
ElementTypeBinding: |
282 |
|
|
@Name: IFISA |
283 |
|
|
@ElementType: |
284 |
|
|
dis:ISA |
285 |
|
|
@ShadowContent: |
286 |
|
|
@@ForCheck: ManakaiDOM|ForIF |
287 |
|
|
|
288 |
|
|
ElementTypeBinding: |
289 |
|
|
@Name: ClsISA |
290 |
|
|
@ElementType: |
291 |
|
|
dis:ISA |
292 |
|
|
@ShadowContent: |
293 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
294 |
|
|
|
295 |
|
|
ElementTypeBinding: |
296 |
|
|
@Name: disDef |
297 |
|
|
@ElementType: |
298 |
|
|
dis:Def |
299 |
|
|
@ShadowContent: |
300 |
|
|
@@ContentType: |
301 |
|
|
lang:dis |
302 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
303 |
|
|
|
304 |
|
|
ElementTypeBinding: |
305 |
|
|
@Name: Code |
306 |
|
|
@ElementType: |
307 |
|
|
dis:ResourceDef |
308 |
|
|
@ShadowContent: |
309 |
|
|
@@DISCore:resourceType: dlp|InlineCode |
310 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
311 |
|
|
|
312 |
|
|
ElementTypeBinding: |
313 |
|
|
@Name: Test |
314 |
|
|
@ElementType: |
315 |
|
|
dis:ResourceDef |
316 |
|
|
@ShadowContent: |
317 |
|
|
@@DISCore:resourceType: test|StandaloneTest |
318 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
319 |
|
|
|
320 |
|
|
ElementTypeBinding: |
321 |
|
|
@Name: TestC |
322 |
|
|
@ElementType: |
323 |
|
|
dis:ResourceDef |
324 |
|
|
@ShadowContent: |
325 |
|
|
@@DISCore:resourceType: test|StandaloneTest |
326 |
|
|
|
327 |
|
|
ResourceDef: |
328 |
|
|
@QName: Document |
329 |
|
|
@AliasFor: td|Document |
330 |
|
|
|
331 |
|
|
ResourceDef: |
332 |
|
|
@QName: Element |
333 |
|
|
@AliasFor: te|Element |
334 |
|
|
|
335 |
|
|
ResourceDef: |
336 |
|
|
@QName: Attr |
337 |
|
|
@AliasFor: te|Attr |
338 |
|
|
|
339 |
|
|
ResourceDef: |
340 |
|
|
@QName: Text |
341 |
|
|
@AliasFor: te|Text |
342 |
|
|
|
343 |
|
|
ResourceDef: |
344 |
|
|
@QName: DOMString |
345 |
|
|
@AliasFor: DOMMain|DOMString |
346 |
|
|
|
347 |
|
|
ResourceDef: |
348 |
|
|
@QName: boolean |
349 |
wakaba |
1.12 |
@AliasFor: idl|boolean |
350 |
wakaba |
1.1 |
|
351 |
|
|
ResourceDef: |
352 |
|
|
@QName: Node |
353 |
|
|
@AliasFor: tc|Node |
354 |
|
|
|
355 |
|
|
ResourceDef: |
356 |
|
|
@QName: NodeFilter |
357 |
|
|
@AliasFor: trv|NodeFilter |
358 |
|
|
|
359 |
|
|
ResourceDef: |
360 |
|
|
@QName: TreeWalker |
361 |
|
|
@AliasFor: trv|TreeWalker |
362 |
|
|
|
363 |
|
|
ElementTypeBinding: |
364 |
|
|
@Name: enDesc |
365 |
|
|
@ElementType: |
366 |
|
|
dis:Description |
367 |
|
|
@ShadowContent: |
368 |
|
|
@@lang:en |
369 |
|
|
|
370 |
|
|
ElementTypeBinding: |
371 |
|
|
@Name: TrueCase |
372 |
|
|
@ElementType: |
373 |
|
|
dis:ResourceDef |
374 |
|
|
@ShadowContent: |
375 |
|
|
@@DISCore:resourceType: |
376 |
|
|
ManakaiDOM:InCase |
377 |
|
|
@@Value: |
378 |
|
|
@@@@: 1 |
379 |
|
|
@@@ContentType: DISCore|Boolean |
380 |
wakaba |
1.12 |
@@Type: idl|boolean |
381 |
wakaba |
1.1 |
|
382 |
|
|
ElementTypeBinding: |
383 |
|
|
@Name: FalseCase |
384 |
|
|
@ElementType: |
385 |
|
|
dis:ResourceDef |
386 |
|
|
@ShadowContent: |
387 |
|
|
@@DISCore:resourceType: |
388 |
|
|
ManakaiDOM:InCase |
389 |
|
|
@@Value: |
390 |
|
|
@@@@: 0 |
391 |
|
|
@@@ContentType: DISCore|Boolean |
392 |
wakaba |
1.12 |
@@Type: idl|boolean |
393 |
wakaba |
1.1 |
|
394 |
|
|
## -- Features |
395 |
|
|
|
396 |
|
|
ElementTypeBinding: |
397 |
|
|
@Name: FeatureDef |
398 |
|
|
@ElementType: |
399 |
|
|
dis:ResourceDef |
400 |
|
|
@ShadowContent: |
401 |
|
|
@@DISCore:resourceType: f|Feature |
402 |
|
|
|
403 |
|
|
ElementTypeBinding: |
404 |
|
|
@Name: FeatureVerDef |
405 |
|
|
@ElementType: |
406 |
|
|
dis:ResourceDef |
407 |
|
|
@ShadowContent: |
408 |
|
|
@@DISCore:resourceType: f|Feature |
409 |
|
|
|
410 |
|
|
ElementTypeBinding: |
411 |
|
|
@Name: featureQName |
412 |
|
|
@ElementType: |
413 |
|
|
f:name |
414 |
|
|
@ShadowContent: |
415 |
|
|
@@ContentType: DISCore|QName |
416 |
|
|
|
417 |
|
|
FeatureDef: |
418 |
|
|
@featureQName: fe|XDP |
419 |
|
|
@QName: XDPFeature |
420 |
|
|
@FeatureVerDef: |
421 |
|
|
@@QName: XDPFeature30 |
422 |
|
|
@@Version: 3.0 |
423 |
|
|
@@f:instanceOf: XDPFeature |
424 |
|
|
@@f:requires: tx|XMLFeature30 |
425 |
|
|
@@enDesc: |
426 |
|
|
The XDP DOM, version 3.0. |
427 |
|
|
|
428 |
|
|
## -- Document |
429 |
|
|
|
430 |
|
|
IFClsDef: |
431 |
|
|
@IFQName: XDPDocument |
432 |
|
|
@ClsQName: ManakaiDOMXDPDocument |
433 |
|
|
|
434 |
wakaba |
1.9 |
@domperl:implementedByObjectsOf: Document |
435 |
|
|
@domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument |
436 |
wakaba |
1.1 |
|
437 |
|
|
@f:implements: XDPFeature30 |
438 |
|
|
@f:provides: |
439 |
|
|
@@@: XDPFeature30 |
440 |
|
|
@@f:through: c|ManakaiDOMImplementation |
441 |
|
|
|
442 |
|
|
@enDesc: |
443 |
|
|
The <IF::XDPDocument> interface provides a set of methods |
444 |
|
|
to create instances of XDP interfaces. |
445 |
|
|
|
446 |
|
|
If the implementation supports the <Feature::fe|XDP> feature |
447 |
|
|
version <Feature::3.0>, <IF::Document> objects <kwd:MUST> also |
448 |
|
|
implement the <IF::XDPDocument> interface. |
449 |
|
|
|
450 |
|
|
@Test: |
451 |
|
|
@@QName: XDPDocument.interface.test |
452 |
|
|
@@PerlDef: |
453 |
|
|
for ( |
454 |
|
|
<IFName::XDPDocument>, |
455 |
|
|
<IFName::Document>, |
456 |
|
|
<IFName::Node>, |
457 |
|
|
<IFName::f|GetFeature>, |
458 |
|
|
) { |
459 |
|
|
$test->id ($_); |
460 |
wakaba |
1.10 |
$test->assert_true (<Class::td|ManakaiDOMDocument>->isa ($_)); |
461 |
wakaba |
1.1 |
} |
462 |
|
|
|
463 |
|
|
@Test: |
464 |
|
|
@@QName: Document.getFeature.XDPDocument.test |
465 |
|
|
@@PerlDef: |
466 |
|
|
my $doc; |
467 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
468 |
|
|
my $docp = $doc->get_feature (<Q::fe|XDP>, '3.0'); |
469 |
|
|
|
470 |
|
|
$test->id ($docp, <IFName::XDPDocument>); |
471 |
|
|
|
472 |
|
|
@CODE: |
473 |
|
|
@@QName: createXDPDocumentForTest |
474 |
|
|
@@PerlDef: |
475 |
|
|
my $__edoc; |
476 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $__edoc}__; |
477 |
|
|
$doc = $__edoc->get_feature (<Q::fe|XDP> => '3.0'); |
478 |
|
|
|
479 |
|
|
@Method: |
480 |
|
|
@@Name: createXDPS |
481 |
|
|
@@dlp:methodName: create_xdp_s |
482 |
|
|
@@enDesc: |
483 |
|
|
Creates a <XE::xdp|s> element. |
484 |
|
|
@@Param: |
485 |
|
|
@@@Name: value |
486 |
|
|
@@@Type: DOMString |
487 |
|
|
@@@enDesc: |
488 |
|
|
The value of the element. |
489 |
|
|
@@@nullCase: |
490 |
|
|
@@@@enDesc: |
491 |
|
|
The element's <A::Node.textContent> is set to |
492 |
|
|
a <CHAR::SPACE>. |
493 |
|
|
@@Return: |
494 |
|
|
@@@Type: XDPElement |
495 |
|
|
@@@enDesc: |
496 |
|
|
The newly created element node. |
497 |
|
|
|
498 |
|
|
{P:: A new <IF::Element> node with following attributes |
499 |
|
|
<kwd:MUST> be returned: |
500 |
|
|
|
501 |
|
|
- <A::Node.localName>::: <XE::s>. |
502 |
|
|
|
503 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
504 |
|
|
|
505 |
|
|
- <A::Node.ownerDocument>::: The document. |
506 |
|
|
|
507 |
|
|
- <A::Node.textContent>::: <P::value>, or a <CHAR::SPACE> |
508 |
|
|
if <P::value> is <DOM::null>. |
509 |
|
|
|
510 |
|
|
} |
511 |
|
|
|
512 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
513 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
514 |
|
|
<kwd:MUST> be set to <DOM::false>. |
515 |
|
|
@@@PerlDef: |
516 |
|
|
__DEEP{ |
517 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 's'); |
518 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ' '); |
519 |
|
|
}__; |
520 |
|
|
|
521 |
|
|
@@Test: |
522 |
|
|
@@@QName: XDPDocument.createXDPS.1.test |
523 |
|
|
@@@PerlDef: |
524 |
|
|
my $doc; |
525 |
|
|
__CODE{createXDPDocumentForTest}__; |
526 |
|
|
|
527 |
|
|
my $value = "\t"; |
528 |
|
|
my $el = $doc-><M::XDPDocument.createXDPS> ($value); |
529 |
|
|
|
530 |
|
|
$test->id ('interface'); |
531 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
532 |
|
|
|
533 |
|
|
$test->id ('namespaceURI'); |
534 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
535 |
|
|
|
536 |
|
|
$test->id ('localName'); |
537 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 's'); |
538 |
|
|
|
539 |
|
|
$test->id ('textContent'); |
540 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
541 |
|
|
|
542 |
|
|
$test->id ('dtdText'); |
543 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value); |
544 |
|
|
@@Test: |
545 |
|
|
@@@QName: XDPDocument.createXDPS.2.test |
546 |
|
|
@@@PerlDef: |
547 |
|
|
my $doc; |
548 |
|
|
__CODE{createXDPDocumentForTest}__; |
549 |
|
|
|
550 |
|
|
my $value = null; |
551 |
|
|
my $el = $doc-><M::XDPDocument.createXDPS> ($value); |
552 |
|
|
|
553 |
|
|
$test->id ('interface'); |
554 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
555 |
|
|
|
556 |
|
|
$test->id ('namespaceURI'); |
557 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
558 |
|
|
|
559 |
|
|
$test->id ('localName'); |
560 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 's'); |
561 |
|
|
|
562 |
|
|
$test->id ('textContent'); |
563 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ' '); |
564 |
|
|
|
565 |
|
|
$test->id ('dtdText'); |
566 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ' '); |
567 |
|
|
|
568 |
|
|
@Method: |
569 |
|
|
@@Name: createXDPName |
570 |
|
|
@@enDesc: |
571 |
|
|
Creates a <XE::xdp|name> element. |
572 |
|
|
@@Param: |
573 |
|
|
@@@Name: value |
574 |
|
|
@@@Type: DOMString |
575 |
|
|
@@@enDesc: |
576 |
|
|
The value of the element. |
577 |
|
|
@@@nullCase: |
578 |
|
|
@@@@enDesc: |
579 |
|
|
Same as an empty string. |
580 |
|
|
@@Return: |
581 |
|
|
@@@Type: XDPElement |
582 |
|
|
@@@enDesc: |
583 |
|
|
The newly created element node. |
584 |
|
|
|
585 |
|
|
{P:: A new <IF::Element> node with following attributes |
586 |
|
|
<kwd:MUST> be returned: |
587 |
|
|
|
588 |
|
|
- <A::Node.localName>::: <XE::name>. |
589 |
|
|
|
590 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
591 |
|
|
|
592 |
|
|
- <A::Node.ownerDocument>::: The document. |
593 |
|
|
|
594 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
595 |
|
|
string if <P::value> is <DOM::null>. |
596 |
|
|
|
597 |
|
|
} |
598 |
|
|
|
599 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
600 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
601 |
|
|
<kwd:MUST> be set to <DOM::false>. |
602 |
|
|
@@@PerlDef: |
603 |
|
|
__DEEP{ |
604 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'name'); |
605 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
606 |
|
|
}__; |
607 |
|
|
|
608 |
|
|
@@Test: |
609 |
|
|
@@@QName: XDPDocument.createXDPName.1.test |
610 |
|
|
@@@PerlDef: |
611 |
|
|
my $doc; |
612 |
|
|
__CODE{createXDPDocumentForTest}__; |
613 |
|
|
|
614 |
|
|
my $value = "example-name"; |
615 |
|
|
my $el = $doc-><M::XDPDocument.createXDPName> ($value); |
616 |
|
|
|
617 |
|
|
$test->id ('interface'); |
618 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
619 |
|
|
|
620 |
|
|
$test->id ('namespaceURI'); |
621 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
622 |
|
|
|
623 |
|
|
$test->id ('localName'); |
624 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'name'); |
625 |
|
|
|
626 |
|
|
$test->id ('textContent'); |
627 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
628 |
|
|
|
629 |
|
|
$test->id ('dtdText'); |
630 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value); |
631 |
|
|
@@Test: |
632 |
|
|
@@@QName: XDPDocument.createXDPName.2.test |
633 |
|
|
@@@PerlDef: |
634 |
|
|
my $doc; |
635 |
|
|
__CODE{createXDPDocumentForTest}__; |
636 |
|
|
|
637 |
|
|
my $value = "example-name"; |
638 |
|
|
my $el = $doc-><M::XDPDocument.createXDPName> (null); |
639 |
|
|
|
640 |
|
|
$test->id ('interface'); |
641 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
642 |
|
|
|
643 |
|
|
$test->id ('namespaceURI'); |
644 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
645 |
|
|
|
646 |
|
|
$test->id ('localName'); |
647 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'name'); |
648 |
|
|
|
649 |
|
|
$test->id ('textContent'); |
650 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
651 |
|
|
|
652 |
|
|
$test->id ('dtdText'); |
653 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
654 |
|
|
|
655 |
|
|
@Method: |
656 |
|
|
@@Name: createXDPNmtoken |
657 |
|
|
@@enDesc: |
658 |
|
|
Creates a <XE::xdp|nmtoken> element. |
659 |
|
|
@@Param: |
660 |
|
|
@@@Name: value |
661 |
|
|
@@@Type: DOMString |
662 |
|
|
@@@enDesc: |
663 |
|
|
The value of the element. |
664 |
|
|
@@@nullCase: |
665 |
|
|
@@@@enDesc: |
666 |
|
|
Same as an empty string. |
667 |
|
|
@@Return: |
668 |
|
|
@@@Type: XDPElement |
669 |
|
|
@@@enDesc: |
670 |
|
|
The newly created element node. |
671 |
|
|
|
672 |
|
|
{P:: A new <IF::Element> node with following attributes |
673 |
|
|
<kwd:MUST> be returned: |
674 |
|
|
|
675 |
|
|
- <A::Node.localName>::: <XE::nmtoken>. |
676 |
|
|
|
677 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
678 |
|
|
|
679 |
|
|
- <A::Node.ownerDocument>::: The document. |
680 |
|
|
|
681 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
682 |
|
|
string if <P::value> is <DOM::null>. |
683 |
|
|
|
684 |
|
|
} |
685 |
|
|
|
686 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
687 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
688 |
|
|
<kwd:MUST> be set to <DOM::false>. |
689 |
|
|
@@@PerlDef: |
690 |
|
|
__DEEP{ |
691 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'nmtoken'); |
692 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
693 |
|
|
}__; |
694 |
|
|
|
695 |
|
|
@@Test: |
696 |
|
|
@@@QName: XDPDocument.createXDPNmtoken.1.test |
697 |
|
|
@@@PerlDef: |
698 |
|
|
my $doc; |
699 |
|
|
__CODE{createXDPDocumentForTest}__; |
700 |
|
|
|
701 |
|
|
my $value = "example-name"; |
702 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNmtoken> ($value); |
703 |
|
|
|
704 |
|
|
$test->id ('interface'); |
705 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
706 |
|
|
|
707 |
|
|
$test->id ('namespaceURI'); |
708 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
709 |
|
|
|
710 |
|
|
$test->id ('localName'); |
711 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'nmtoken'); |
712 |
|
|
|
713 |
|
|
$test->id ('textContent'); |
714 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
715 |
|
|
|
716 |
|
|
$test->id ('dtdText'); |
717 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value); |
718 |
|
|
@@Test: |
719 |
|
|
@@@QName: XDPDocument.createXDPNmtoken.2.test |
720 |
|
|
@@@PerlDef: |
721 |
|
|
my $doc; |
722 |
|
|
__CODE{createXDPDocumentForTest}__; |
723 |
|
|
|
724 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNmtoken> (null); |
725 |
|
|
|
726 |
|
|
$test->id ('interface'); |
727 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
728 |
|
|
|
729 |
|
|
$test->id ('namespaceURI'); |
730 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
731 |
|
|
|
732 |
|
|
$test->id ('localName'); |
733 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'nmtoken'); |
734 |
|
|
|
735 |
|
|
$test->id ('textContent'); |
736 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
737 |
|
|
|
738 |
|
|
$test->id ('dtdText'); |
739 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
740 |
|
|
|
741 |
|
|
@Method: |
742 |
|
|
@@Name: createXDPKeyword |
743 |
|
|
@@enDesc: |
744 |
|
|
Creates a <XE::xdp|keyword> element. |
745 |
|
|
@@Param: |
746 |
|
|
@@@Name: value |
747 |
|
|
@@@Type: DOMString |
748 |
|
|
@@@enDesc: |
749 |
|
|
The value of the element. |
750 |
|
|
@@@nullCase: |
751 |
|
|
@@@@enDesc: |
752 |
|
|
Same as an empty string. |
753 |
|
|
@@Return: |
754 |
|
|
@@@Type: XDPElement |
755 |
|
|
@@@enDesc: |
756 |
|
|
The newly created element node. |
757 |
|
|
|
758 |
|
|
{P:: A new <IF::Element> node with following attributes |
759 |
|
|
<kwd:MUST> be returned: |
760 |
|
|
|
761 |
|
|
- <A::Node.localName>::: <XE::keyword>. |
762 |
|
|
|
763 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
764 |
|
|
|
765 |
|
|
- <A::Node.ownerDocument>::: The document. |
766 |
|
|
|
767 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
768 |
|
|
string if <P::value> is <DOM::null>. |
769 |
|
|
|
770 |
|
|
} |
771 |
|
|
|
772 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
773 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
774 |
|
|
<kwd:MUST> be set to <DOM::false>. |
775 |
|
|
@@@PerlDef: |
776 |
|
|
__DEEP{ |
777 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'keyword'); |
778 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
779 |
|
|
}__; |
780 |
|
|
|
781 |
|
|
@@Test: |
782 |
|
|
@@@QName: XDPDocument.createXDPKeyword.1.test |
783 |
|
|
@@@PerlDef: |
784 |
|
|
my $doc; |
785 |
|
|
__CODE{createXDPDocumentForTest}__; |
786 |
|
|
|
787 |
|
|
my $value = "PUBLIC"; |
788 |
|
|
my $el = $doc-><M::XDPDocument.createXDPKeyword> ($value); |
789 |
|
|
|
790 |
|
|
$test->id ('interface'); |
791 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
792 |
|
|
|
793 |
|
|
$test->id ('namespaceURI'); |
794 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
795 |
|
|
|
796 |
|
|
$test->id ('localName'); |
797 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'keyword'); |
798 |
|
|
|
799 |
|
|
$test->id ('textContent'); |
800 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
801 |
|
|
|
802 |
|
|
$test->id ('dtdText'); |
803 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value); |
804 |
|
|
@@Test: |
805 |
|
|
@@@QName: XDPDocument.createXDPKeyword.2.test |
806 |
|
|
@@@PerlDef: |
807 |
|
|
my $doc; |
808 |
|
|
__CODE{createXDPDocumentForTest}__; |
809 |
|
|
|
810 |
|
|
my $el = $doc-><M::XDPDocument.createXDPKeyword> (null); |
811 |
|
|
|
812 |
|
|
$test->id ('interface'); |
813 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
814 |
|
|
|
815 |
|
|
$test->id ('namespaceURI'); |
816 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
817 |
|
|
|
818 |
|
|
$test->id ('localName'); |
819 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'keyword'); |
820 |
|
|
|
821 |
|
|
$test->id ('textContent'); |
822 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
823 |
|
|
|
824 |
|
|
$test->id ('dtdText'); |
825 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
826 |
|
|
|
827 |
|
|
@Method: |
828 |
|
|
@@Name: createXDPRNIKeyword |
829 |
wakaba |
1.5 |
@@dlp:methodName: create_xdp_rni_keyword |
830 |
wakaba |
1.1 |
@@enDesc: |
831 |
|
|
Creates a <XE::xdp|rni-keyword> element. |
832 |
|
|
@@Param: |
833 |
|
|
@@@Name: value |
834 |
|
|
@@@Type: DOMString |
835 |
|
|
@@@enDesc: |
836 |
|
|
The value of the element. |
837 |
|
|
@@@nullCase: |
838 |
|
|
@@@@enDesc: |
839 |
|
|
Same as an empty string. |
840 |
|
|
@@Return: |
841 |
|
|
@@@Type: XDPRNIKeywordElement |
842 |
|
|
@@@enDesc: |
843 |
|
|
The newly created element node. |
844 |
|
|
|
845 |
|
|
{P:: A new <IF::Element> node with following attributes |
846 |
|
|
<kwd:MUST> be returned: |
847 |
|
|
|
848 |
|
|
- <A::Node.localName>::: <XE::rni-keyword>. |
849 |
|
|
|
850 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
851 |
|
|
|
852 |
|
|
- <A::Node.ownerDocument>::: The document. |
853 |
|
|
|
854 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
855 |
|
|
string if <P::value> is <DOM::null>. |
856 |
|
|
|
857 |
|
|
} |
858 |
|
|
|
859 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
860 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
861 |
|
|
<kwd:MUST> be set to <DOM::false>. |
862 |
|
|
@@@PerlDef: |
863 |
|
|
__DEEP{ |
864 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'rni-keyword'); |
865 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
866 |
|
|
}__; |
867 |
|
|
|
868 |
|
|
@@Test: |
869 |
|
|
@@@QName: XDPDocument.createXDPRNIKeyword.1.test |
870 |
|
|
@@@PerlDef: |
871 |
|
|
my $doc; |
872 |
|
|
__CODE{createXDPDocumentForTest}__; |
873 |
|
|
|
874 |
|
|
my $value = "PCDATA"; |
875 |
|
|
my $el = $doc-><M::XDPDocument.createXDPRNIKeyword> ($value); |
876 |
|
|
|
877 |
|
|
$test->id ('interface'); |
878 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
879 |
|
|
|
880 |
|
|
$test->id ('namespaceURI'); |
881 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
882 |
|
|
|
883 |
|
|
$test->id ('localName'); |
884 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'rni-keyword'); |
885 |
|
|
|
886 |
|
|
$test->id ('textContent'); |
887 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
888 |
|
|
|
889 |
|
|
$test->id ('dtdText'); |
890 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '#'.$value); |
891 |
|
|
@@Test: |
892 |
|
|
@@@QName: XDPDocument.createXDPRNIKeyword.2.test |
893 |
|
|
@@@PerlDef: |
894 |
|
|
my $doc; |
895 |
|
|
__CODE{createXDPDocumentForTest}__; |
896 |
|
|
|
897 |
|
|
my $el = $doc-><M::XDPDocument.createXDPRNIKeyword> (null); |
898 |
|
|
|
899 |
|
|
$test->id ('interface'); |
900 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
901 |
|
|
|
902 |
|
|
$test->id ('namespaceURI'); |
903 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
904 |
|
|
|
905 |
|
|
$test->id ('localName'); |
906 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'rni-keyword'); |
907 |
|
|
|
908 |
|
|
$test->id ('textContent'); |
909 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
910 |
|
|
|
911 |
|
|
$test->id ('dtdText'); |
912 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '#'); |
913 |
|
|
|
914 |
|
|
@Method: |
915 |
|
|
@@Name: createXDPDelimiter |
916 |
|
|
@@enDesc: |
917 |
|
|
Creates a <XE::xdp|delimiter> element. |
918 |
|
|
@@Param: |
919 |
|
|
@@@Name: value |
920 |
|
|
@@@Type: DOMString |
921 |
|
|
@@@enDesc: |
922 |
|
|
The value of the element. |
923 |
|
|
@@@nullCase: |
924 |
|
|
@@@@enDesc: |
925 |
|
|
Same as an empty string. |
926 |
|
|
@@Return: |
927 |
|
|
@@@Type: XDPElement |
928 |
|
|
@@@enDesc: |
929 |
|
|
The newly created element node. |
930 |
|
|
|
931 |
|
|
{P:: A new <IF::Element> node with following attributes |
932 |
|
|
<kwd:MUST> be returned: |
933 |
|
|
|
934 |
|
|
- <A::Node.localName>::: <XE::delimiter>. |
935 |
|
|
|
936 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
937 |
|
|
|
938 |
|
|
- <A::Node.ownerDocument>::: The document. |
939 |
|
|
|
940 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
941 |
|
|
string if <P::value> is <DOM::null>. |
942 |
|
|
|
943 |
|
|
} |
944 |
|
|
|
945 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
946 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
947 |
|
|
<kwd:MUST> be set to <DOM::false>. |
948 |
|
|
@@@PerlDef: |
949 |
|
|
__DEEP{ |
950 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'delimiter'); |
951 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
952 |
|
|
}__; |
953 |
|
|
|
954 |
|
|
@@Test: |
955 |
|
|
@@@QName: XDPDocument.createXDPDelimiter.1.test |
956 |
|
|
@@@PerlDef: |
957 |
|
|
my $doc; |
958 |
|
|
__CODE{createXDPDocumentForTest}__; |
959 |
|
|
|
960 |
|
|
my $value = "%"; |
961 |
|
|
my $el = $doc-><M::XDPDocument.createXDPDelimiter> ($value); |
962 |
|
|
|
963 |
|
|
$test->id ('interface'); |
964 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
965 |
|
|
|
966 |
|
|
$test->id ('namespaceURI'); |
967 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
968 |
|
|
|
969 |
|
|
$test->id ('localName'); |
970 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'delimiter'); |
971 |
|
|
|
972 |
|
|
$test->id ('textContent'); |
973 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
974 |
|
|
|
975 |
|
|
$test->id ('dtdText'); |
976 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value); |
977 |
|
|
@@Test: |
978 |
|
|
@@@QName: XDPDocument.createXDPDelimiter.2.test |
979 |
|
|
@@@PerlDef: |
980 |
|
|
my $doc; |
981 |
|
|
__CODE{createXDPDocumentForTest}__; |
982 |
|
|
|
983 |
|
|
my $el = $doc-><M::XDPDocument.createXDPDelimiter> (null); |
984 |
|
|
|
985 |
|
|
$test->id ('interface'); |
986 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
987 |
|
|
|
988 |
|
|
$test->id ('namespaceURI'); |
989 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
990 |
|
|
|
991 |
|
|
$test->id ('localName'); |
992 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'delimiter'); |
993 |
|
|
|
994 |
|
|
$test->id ('textContent'); |
995 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
996 |
|
|
|
997 |
|
|
$test->id ('dtdText'); |
998 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
999 |
|
|
|
1000 |
|
|
@Method: |
1001 |
|
|
@@Name: createXDPEntityValue |
1002 |
|
|
@@enDesc: |
1003 |
|
|
Creates a <XE::xdp|entity-value> element. |
1004 |
|
|
@@Param: |
1005 |
|
|
@@@Name: value |
1006 |
|
|
@@@Type: DOMString |
1007 |
|
|
@@@enDesc: |
1008 |
|
|
The value of the element. |
1009 |
|
|
@@@nullCase: |
1010 |
|
|
@@@@enDesc: |
1011 |
|
|
Same as an empty string. |
1012 |
|
|
@@Return: |
1013 |
|
|
@@@Type: XDPEntityValueElement |
1014 |
|
|
@@@enDesc: |
1015 |
|
|
The newly created element node. |
1016 |
|
|
|
1017 |
|
|
{P:: A new <IF::Element> node with following attributes |
1018 |
|
|
<kwd:MUST> be returned: |
1019 |
|
|
|
1020 |
|
|
- <A::Node.localName>::: <XE::entity-value>. |
1021 |
|
|
|
1022 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1023 |
|
|
|
1024 |
|
|
- <A::Node.ownerDocument>::: The document. |
1025 |
|
|
|
1026 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1027 |
|
|
string if <P::value> is <DOM::null>. |
1028 |
|
|
|
1029 |
|
|
} |
1030 |
|
|
|
1031 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
1032 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
1033 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1034 |
|
|
@@@PerlDef: |
1035 |
|
|
__DEEP{ |
1036 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'entity-value'); |
1037 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1038 |
|
|
}__; |
1039 |
|
|
|
1040 |
|
|
@@Test: |
1041 |
|
|
@@@QName: XDPDocument.createXDPEntityValue.1.test |
1042 |
|
|
@@@PerlDef: |
1043 |
|
|
my $doc; |
1044 |
|
|
__CODE{createXDPDocumentForTest}__; |
1045 |
|
|
|
1046 |
|
|
my $value = q<a%b;c&d;e"f"g'h'i>; |
1047 |
|
|
my $qvalue = q<'a%b;c&d;e"f"g'h'i'>; |
1048 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntityValue> ($value); |
1049 |
|
|
|
1050 |
|
|
$test->id ('interface'); |
1051 |
|
|
$test->assert_isa ($el, <IFName::XDPEntityValueElement>); |
1052 |
|
|
|
1053 |
|
|
$test->id ('namespaceURI'); |
1054 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1055 |
|
|
|
1056 |
|
|
$test->id ('localName'); |
1057 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'entity-value'); |
1058 |
|
|
|
1059 |
|
|
$test->id ('textContent'); |
1060 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1061 |
|
|
|
1062 |
|
|
$test->id ('dtdText'); |
1063 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $qvalue); |
1064 |
|
|
@@Test: |
1065 |
|
|
@@@QName: XDPDocument.createXDPEntityValue.2.test |
1066 |
|
|
@@@PerlDef: |
1067 |
|
|
my $doc; |
1068 |
|
|
__CODE{createXDPDocumentForTest}__; |
1069 |
|
|
|
1070 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntityValue> (null); |
1071 |
|
|
|
1072 |
|
|
$test->id ('interface'); |
1073 |
|
|
$test->assert_isa ($el, <IFName::XDPEntityValueElement>); |
1074 |
|
|
|
1075 |
|
|
$test->id ('namespaceURI'); |
1076 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1077 |
|
|
|
1078 |
|
|
$test->id ('localName'); |
1079 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'entity-value'); |
1080 |
|
|
|
1081 |
|
|
$test->id ('textContent'); |
1082 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1083 |
|
|
|
1084 |
|
|
$test->id ('dtdText'); |
1085 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
1086 |
|
|
|
1087 |
|
|
@Method: |
1088 |
|
|
@@Name: createXDPMinimumLiteral |
1089 |
|
|
@@enDesc: |
1090 |
|
|
Creates a <XE::xdp|minimum-literal> element. |
1091 |
|
|
@@Param: |
1092 |
|
|
@@@Name: value |
1093 |
|
|
@@@Type: DOMString |
1094 |
|
|
@@@enDesc: |
1095 |
|
|
The value of the element. |
1096 |
|
|
@@@nullCase: |
1097 |
|
|
@@@@enDesc: |
1098 |
|
|
Same as an empty string. |
1099 |
|
|
@@Return: |
1100 |
|
|
@@@Type: XDPMinimumLiteralElement |
1101 |
|
|
@@@enDesc: |
1102 |
|
|
The newly created element node. |
1103 |
|
|
|
1104 |
|
|
{P:: A new <IF::Element> node with following attributes |
1105 |
|
|
<kwd:MUST> be returned: |
1106 |
|
|
|
1107 |
|
|
- <A::Node.localName>::: <XE::minimum-literal>. |
1108 |
|
|
|
1109 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1110 |
|
|
|
1111 |
|
|
- <A::Node.ownerDocument>::: The document. |
1112 |
|
|
|
1113 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1114 |
|
|
string if <P::value> is <DOM::null>. |
1115 |
|
|
|
1116 |
|
|
} |
1117 |
|
|
|
1118 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
1119 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
1120 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1121 |
|
|
@@@PerlDef: |
1122 |
|
|
__DEEP{ |
1123 |
|
|
$r = $self-><M::Document.createElementNS> |
1124 |
|
|
(<Q::xdp|>, 'minimum-literal'); |
1125 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1126 |
|
|
}__; |
1127 |
|
|
|
1128 |
|
|
@@Test: |
1129 |
|
|
@@@QName: XDPDocument.createXDPMinimumLiteral.1.test |
1130 |
|
|
@@@PerlDef: |
1131 |
|
|
my $doc; |
1132 |
|
|
__CODE{createXDPDocumentForTest}__; |
1133 |
|
|
|
1134 |
|
|
my $value = q<a%b;c&d;e"f"g'h'i>; |
1135 |
|
|
my $qvalue = q<"a%b;c&d;e%22f%22g'h'i">; |
1136 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMinimumLiteral> ($value); |
1137 |
|
|
|
1138 |
|
|
$test->id ('interface'); |
1139 |
|
|
$test->assert_isa ($el, <IFName::XDPMinimumLiteralElement>); |
1140 |
|
|
|
1141 |
|
|
$test->id ('namespaceURI'); |
1142 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1143 |
|
|
|
1144 |
|
|
$test->id ('localName'); |
1145 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'minimum-literal'); |
1146 |
|
|
|
1147 |
|
|
$test->id ('textContent'); |
1148 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1149 |
|
|
|
1150 |
|
|
$test->id ('dtdText'); |
1151 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $qvalue); |
1152 |
|
|
@@Test: |
1153 |
|
|
@@@QName: XDPDocument.createXDPMinimumLiteral.2.test |
1154 |
|
|
@@@PerlDef: |
1155 |
|
|
my $doc; |
1156 |
|
|
__CODE{createXDPDocumentForTest}__; |
1157 |
|
|
|
1158 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMinimumLiteral> (null); |
1159 |
|
|
|
1160 |
|
|
$test->id ('interface'); |
1161 |
|
|
$test->assert_isa ($el, <IFName::XDPMinimumLiteralElement>); |
1162 |
|
|
|
1163 |
|
|
$test->id ('namespaceURI'); |
1164 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1165 |
|
|
|
1166 |
|
|
$test->id ('localName'); |
1167 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'minimum-literal'); |
1168 |
|
|
|
1169 |
|
|
$test->id ('textContent'); |
1170 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1171 |
|
|
|
1172 |
|
|
$test->id ('dtdText'); |
1173 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
1174 |
|
|
|
1175 |
|
|
@Method: |
1176 |
|
|
@@Name: createXDPSystemLiteral |
1177 |
|
|
@@enDesc: |
1178 |
|
|
Creates a <XE::xdp|system-literal> element. |
1179 |
|
|
@@Param: |
1180 |
|
|
@@@Name: value |
1181 |
|
|
@@@Type: DOMString |
1182 |
|
|
@@@enDesc: |
1183 |
|
|
The value of the element. |
1184 |
|
|
@@@nullCase: |
1185 |
|
|
@@@@enDesc: |
1186 |
|
|
Same as an empty string. |
1187 |
|
|
@@Return: |
1188 |
|
|
@@@Type: XDPSystemLiteralElement |
1189 |
|
|
@@@enDesc: |
1190 |
|
|
The newly created element node. |
1191 |
|
|
|
1192 |
|
|
{P:: A new <IF::Element> node with following attributes |
1193 |
|
|
<kwd:MUST> be returned: |
1194 |
|
|
|
1195 |
|
|
- <A::Node.localName>::: <XE::system-literal>. |
1196 |
|
|
|
1197 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1198 |
|
|
|
1199 |
|
|
- <A::Node.ownerDocument>::: The document. |
1200 |
|
|
|
1201 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1202 |
|
|
string if <P::value> is <DOM::null>. |
1203 |
|
|
|
1204 |
|
|
} |
1205 |
|
|
|
1206 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
1207 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
1208 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1209 |
|
|
@@@PerlDef: |
1210 |
|
|
__DEEP{ |
1211 |
|
|
$r = $self-><M::Document.createElementNS> |
1212 |
|
|
(<Q::xdp|>, 'system-literal'); |
1213 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1214 |
|
|
}__; |
1215 |
|
|
|
1216 |
|
|
@@Test: |
1217 |
|
|
@@@QName: XDPDocument.createXDPSystemLiteral.1.test |
1218 |
|
|
@@@PerlDef: |
1219 |
|
|
my $doc; |
1220 |
|
|
__CODE{createXDPDocumentForTest}__; |
1221 |
|
|
|
1222 |
|
|
my $value = q<a%b;c&d;e"f"g'h'i>; |
1223 |
|
|
my $qvalue = q<"a%b;c&d;e%22f%22g'h'i">; |
1224 |
|
|
my $el = $doc-><M::XDPDocument.createXDPSystemLiteral> ($value); |
1225 |
|
|
|
1226 |
|
|
$test->id ('interface'); |
1227 |
|
|
$test->assert_isa ($el, <IFName::XDPSystemLiteralElement>); |
1228 |
|
|
|
1229 |
|
|
$test->id ('namespaceURI'); |
1230 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1231 |
|
|
|
1232 |
|
|
$test->id ('localName'); |
1233 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'system-literal'); |
1234 |
|
|
|
1235 |
|
|
$test->id ('textContent'); |
1236 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1237 |
|
|
|
1238 |
|
|
$test->id ('dtdText'); |
1239 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $qvalue); |
1240 |
|
|
@@Test: |
1241 |
|
|
@@@QName: XDPDocument.createXDPSystemLiteral.2.test |
1242 |
|
|
@@@PerlDef: |
1243 |
|
|
my $doc; |
1244 |
|
|
__CODE{createXDPDocumentForTest}__; |
1245 |
|
|
|
1246 |
|
|
my $el = $doc-><M::XDPDocument.createXDPSystemLiteral> (null); |
1247 |
|
|
|
1248 |
|
|
$test->id ('interface'); |
1249 |
|
|
$test->assert_isa ($el, <IFName::XDPSystemLiteralElement>); |
1250 |
|
|
|
1251 |
|
|
$test->id ('namespaceURI'); |
1252 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1253 |
|
|
|
1254 |
|
|
$test->id ('localName'); |
1255 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'system-literal'); |
1256 |
|
|
|
1257 |
|
|
$test->id ('textContent'); |
1258 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1259 |
|
|
|
1260 |
|
|
$test->id ('dtdText'); |
1261 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
1262 |
|
|
|
1263 |
|
|
@Method: |
1264 |
|
|
@@Name: createXDPAttrLiteral |
1265 |
|
|
@@enDesc: |
1266 |
|
|
Creates a <XE::xdp|attr-literal> element. |
1267 |
|
|
@@Param: |
1268 |
|
|
@@@Name: value |
1269 |
|
|
@@@Type: DOMString |
1270 |
|
|
@@@enDesc: |
1271 |
|
|
The value of the element. |
1272 |
|
|
@@@nullCase: |
1273 |
|
|
@@@@enDesc: |
1274 |
|
|
Same as an empty string. |
1275 |
|
|
@@Return: |
1276 |
|
|
@@@Type: XDPAttrLiteralElement |
1277 |
|
|
@@@enDesc: |
1278 |
|
|
The newly created element node. |
1279 |
|
|
|
1280 |
|
|
{P:: A new <IF::Element> node with following attributes |
1281 |
|
|
<kwd:MUST> be returned: |
1282 |
|
|
|
1283 |
|
|
- <A::Node.localName>::: <XE::attr-literal>. |
1284 |
|
|
|
1285 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1286 |
|
|
|
1287 |
|
|
- <A::Node.ownerDocument>::: The document. |
1288 |
|
|
|
1289 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1290 |
|
|
string if <P::value> is <DOM::null>. |
1291 |
|
|
|
1292 |
|
|
} |
1293 |
|
|
|
1294 |
wakaba |
1.2 |
If a <IF::Text> node is created, its |
1295 |
wakaba |
1.1 |
<A::Text.isElementContentWhitespace> attribute value |
1296 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1297 |
|
|
@@@PerlDef: |
1298 |
|
|
__DEEP{ |
1299 |
|
|
$r = $self-><M::Document.createElementNS> |
1300 |
|
|
(<Q::xdp|>, 'attr-literal'); |
1301 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1302 |
|
|
}__; |
1303 |
|
|
|
1304 |
|
|
@@Test: |
1305 |
|
|
@@@QName: XDPDocument.createXDPAttrLiteral.1.test |
1306 |
|
|
@@@PerlDef: |
1307 |
|
|
my $doc; |
1308 |
|
|
__CODE{createXDPDocumentForTest}__; |
1309 |
|
|
|
1310 |
|
|
my $value = q<a%b;c&d;e"f"g'h'i>; |
1311 |
|
|
my $qvalue = q<'a%b;c&d;e"f"g'h'i'>; |
1312 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttrLiteral> ($value); |
1313 |
|
|
|
1314 |
|
|
$test->id ('interface'); |
1315 |
|
|
$test->assert_isa ($el, <IFName::XDPAttrLiteralElement>); |
1316 |
|
|
|
1317 |
|
|
$test->id ('namespaceURI'); |
1318 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1319 |
|
|
|
1320 |
|
|
$test->id ('localName'); |
1321 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-literal'); |
1322 |
|
|
|
1323 |
|
|
$test->id ('textContent'); |
1324 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1325 |
|
|
|
1326 |
|
|
$test->id ('dtdText'); |
1327 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $qvalue); |
1328 |
|
|
@@Test: |
1329 |
|
|
@@@QName: XDPDocument.createXDPAttrLiteral.2.test |
1330 |
|
|
@@@PerlDef: |
1331 |
|
|
my $doc; |
1332 |
|
|
__CODE{createXDPDocumentForTest}__; |
1333 |
|
|
|
1334 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttrLiteral> (null); |
1335 |
|
|
|
1336 |
|
|
$test->id ('interface'); |
1337 |
|
|
$test->assert_isa ($el, <IFName::XDPAttrLiteralElement>); |
1338 |
|
|
|
1339 |
|
|
$test->id ('namespaceURI'); |
1340 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1341 |
|
|
|
1342 |
|
|
$test->id ('localName'); |
1343 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-literal'); |
1344 |
|
|
|
1345 |
|
|
$test->id ('textContent'); |
1346 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1347 |
|
|
|
1348 |
|
|
$test->id ('dtdText'); |
1349 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
1350 |
wakaba |
1.2 |
|
1351 |
|
|
@Method: |
1352 |
|
|
@@Name: createXDPCharRef |
1353 |
|
|
@@enDesc: |
1354 |
|
|
Creates an <XE::xdp|hcr> element. |
1355 |
|
|
@@Param: |
1356 |
|
|
@@@Name: value |
1357 |
|
|
@@@Type: unsignedLong |
1358 |
|
|
@@@enDesc: |
1359 |
|
|
The code point of the character represented |
1360 |
|
|
by the element to create. |
1361 |
|
|
@@Return: |
1362 |
|
|
@@@Type: XDPHCRElement |
1363 |
|
|
@@@enDesc: |
1364 |
|
|
The newly created element node. |
1365 |
|
|
|
1366 |
|
|
{P:: A new <IF::Element> node with following attributes |
1367 |
|
|
<kwd:MUST> be returned: |
1368 |
|
|
|
1369 |
|
|
- <A::Node.localName>::: <XE::hcr>. |
1370 |
|
|
|
1371 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1372 |
|
|
|
1373 |
|
|
- <A::Node.ownerDocument>::: The document. |
1374 |
|
|
|
1375 |
|
|
- <A::Node.textContent>::: A hexadecimal representation |
1376 |
|
|
of the <P::value>, in upper case. |
1377 |
|
|
|
1378 |
|
|
} |
1379 |
|
|
|
1380 |
|
|
If a <IF::Text> node is created, its |
1381 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
1382 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1383 |
|
|
@@@PerlDef: |
1384 |
|
|
__DEEP{ |
1385 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'hcr'); |
1386 |
|
|
$r-><AS::Node.textContent> (sprintf '%04X', $value); |
1387 |
|
|
}__; |
1388 |
|
|
|
1389 |
|
|
@@Test: |
1390 |
|
|
@@@QName: XDPDocument.createXDPCharRef.1.test |
1391 |
|
|
@@@PerlDef: |
1392 |
|
|
my $doc; |
1393 |
|
|
__CODE{createXDPDocumentForTest}__; |
1394 |
|
|
|
1395 |
|
|
my $el = $doc-><M::XDPDocument.createXDPCharRef> (0x4E00); |
1396 |
|
|
|
1397 |
|
|
$test->id ('interface'); |
1398 |
|
|
$test->assert_isa ($el, <IFName::XDPHCRElement>); |
1399 |
|
|
|
1400 |
|
|
$test->id ('namespaceURI'); |
1401 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1402 |
|
|
|
1403 |
|
|
$test->id ('localName'); |
1404 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'hcr'); |
1405 |
|
|
|
1406 |
|
|
$test->id ('textContent'); |
1407 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, '4E00'); |
1408 |
|
|
|
1409 |
|
|
$test->id ('dtdText'); |
1410 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '一'); |
1411 |
|
|
|
1412 |
|
|
@Method: |
1413 |
|
|
@@Name: createXDPPERef |
1414 |
|
|
@@dlp:methodName: create_xdp_peref |
1415 |
|
|
@@enDesc: |
1416 |
|
|
Creates a <XE::xdp|peref> element. |
1417 |
|
|
@@Param: |
1418 |
|
|
@@@Name: value |
1419 |
|
|
@@@Type: DOMString |
1420 |
|
|
@@@enDesc: |
1421 |
|
|
The value of the element, i.e. the name of the |
1422 |
|
|
parameter entity. |
1423 |
|
|
@@@nullCase: |
1424 |
|
|
@@@@enDesc: |
1425 |
|
|
Same as an empty string. |
1426 |
|
|
@@Return: |
1427 |
|
|
@@@Type: XDPPERefElement |
1428 |
|
|
@@@enDesc: |
1429 |
|
|
The newly created element node. |
1430 |
|
|
|
1431 |
|
|
{P:: A new <IF::Element> node with following attributes |
1432 |
|
|
<kwd:MUST> be returned: |
1433 |
|
|
|
1434 |
|
|
- <A::Node.localName>::: <XE::peref>. |
1435 |
|
|
|
1436 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1437 |
|
|
|
1438 |
|
|
- <A::Node.ownerDocument>::: The document. |
1439 |
|
|
|
1440 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1441 |
|
|
string if <P::value> is <DOM::null>. |
1442 |
|
|
|
1443 |
|
|
} |
1444 |
|
|
|
1445 |
|
|
If a <IF::Text> node is created, its |
1446 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
1447 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1448 |
|
|
@@@PerlDef: |
1449 |
|
|
__DEEP{ |
1450 |
|
|
$r = $self-><M::Document.createElementNS> |
1451 |
|
|
(<Q::xdp|>, 'peref'); |
1452 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1453 |
|
|
}__; |
1454 |
|
|
|
1455 |
|
|
@@Test: |
1456 |
|
|
@@@QName: XDPDocument.createXDPPERef.1.test |
1457 |
|
|
@@@PerlDef: |
1458 |
|
|
my $doc; |
1459 |
|
|
__CODE{createXDPDocumentForTest}__; |
1460 |
|
|
|
1461 |
|
|
my $value = q<pename>; |
1462 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPERef> ($value); |
1463 |
|
|
|
1464 |
|
|
$test->id ('interface'); |
1465 |
|
|
$test->assert_isa ($el, <IFName::XDPPERefElement>); |
1466 |
|
|
|
1467 |
|
|
$test->id ('namespaceURI'); |
1468 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1469 |
|
|
|
1470 |
|
|
$test->id ('localName'); |
1471 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'peref'); |
1472 |
|
|
|
1473 |
|
|
$test->id ('textContent'); |
1474 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1475 |
|
|
|
1476 |
|
|
$test->id ('dtdText'); |
1477 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '%'.$value.';'); |
1478 |
|
|
@@Test: |
1479 |
|
|
@@@QName: XDPDocument.createXDPPERef.2.test |
1480 |
|
|
@@@PerlDef: |
1481 |
|
|
my $doc; |
1482 |
|
|
__CODE{createXDPDocumentForTest}__; |
1483 |
|
|
|
1484 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPERef> (null); |
1485 |
|
|
|
1486 |
|
|
$test->id ('interface'); |
1487 |
|
|
$test->assert_isa ($el, <IFName::XDPPERefElement>); |
1488 |
|
|
|
1489 |
|
|
$test->id ('namespaceURI'); |
1490 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1491 |
|
|
|
1492 |
|
|
$test->id ('localName'); |
1493 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'peref'); |
1494 |
|
|
|
1495 |
|
|
$test->id ('textContent'); |
1496 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1497 |
|
|
|
1498 |
|
|
$test->id ('dtdText'); |
1499 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '%;'); |
1500 |
|
|
|
1501 |
|
|
@Method: |
1502 |
|
|
@@Name: createXDPGERef |
1503 |
|
|
@@dlp:methodName: create_xdp_geref |
1504 |
|
|
@@enDesc: |
1505 |
|
|
Creates a <XE::xdp|geref> element. |
1506 |
|
|
@@Param: |
1507 |
|
|
@@@Name: value |
1508 |
|
|
@@@Type: DOMString |
1509 |
|
|
@@@enDesc: |
1510 |
|
|
The value of the element, i.e. the name of the |
1511 |
|
|
general entity. |
1512 |
|
|
@@@nullCase: |
1513 |
|
|
@@@@enDesc: |
1514 |
|
|
Same as an empty string. |
1515 |
|
|
@@Return: |
1516 |
|
|
@@@Type: XDPGERefElement |
1517 |
|
|
@@@enDesc: |
1518 |
|
|
The newly created element node. |
1519 |
|
|
|
1520 |
|
|
{P:: A new <IF::Element> node with following attributes |
1521 |
|
|
<kwd:MUST> be returned: |
1522 |
|
|
|
1523 |
|
|
- <A::Node.localName>::: <XE::geref>. |
1524 |
|
|
|
1525 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1526 |
|
|
|
1527 |
|
|
- <A::Node.ownerDocument>::: The document. |
1528 |
|
|
|
1529 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1530 |
|
|
string if <P::value> is <DOM::null>. |
1531 |
|
|
|
1532 |
|
|
} |
1533 |
|
|
|
1534 |
|
|
If a <IF::Text> node is created, its |
1535 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
1536 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1537 |
|
|
@@@PerlDef: |
1538 |
|
|
__DEEP{ |
1539 |
|
|
$r = $self-><M::Document.createElementNS> |
1540 |
|
|
(<Q::xdp|>, 'geref'); |
1541 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1542 |
|
|
}__; |
1543 |
|
|
|
1544 |
|
|
@@Test: |
1545 |
|
|
@@@QName: XDPDocument.createXDPGERef.1.test |
1546 |
|
|
@@@PerlDef: |
1547 |
|
|
my $doc; |
1548 |
|
|
__CODE{createXDPDocumentForTest}__; |
1549 |
|
|
|
1550 |
|
|
my $value = q<pename>; |
1551 |
|
|
my $el = $doc-><M::XDPDocument.createXDPGERef> ($value); |
1552 |
|
|
|
1553 |
|
|
$test->id ('interface'); |
1554 |
|
|
$test->assert_isa ($el, <IFName::XDPGERefElement>); |
1555 |
|
|
|
1556 |
|
|
$test->id ('namespaceURI'); |
1557 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1558 |
|
|
|
1559 |
|
|
$test->id ('localName'); |
1560 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'geref'); |
1561 |
|
|
|
1562 |
|
|
$test->id ('textContent'); |
1563 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1564 |
|
|
|
1565 |
|
|
$test->id ('dtdText'); |
1566 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '&'.$value.';'); |
1567 |
|
|
@@Test: |
1568 |
|
|
@@@QName: XDPDocument.createXDPGERef.2.test |
1569 |
|
|
@@@PerlDef: |
1570 |
|
|
my $doc; |
1571 |
|
|
__CODE{createXDPDocumentForTest}__; |
1572 |
|
|
|
1573 |
|
|
my $el = $doc-><M::XDPDocument.createXDPGERef> (null); |
1574 |
|
|
|
1575 |
|
|
$test->id ('interface'); |
1576 |
|
|
$test->assert_isa ($el, <IFName::XDPGERefElement>); |
1577 |
|
|
|
1578 |
|
|
$test->id ('namespaceURI'); |
1579 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1580 |
|
|
|
1581 |
|
|
$test->id ('localName'); |
1582 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'geref'); |
1583 |
|
|
|
1584 |
|
|
$test->id ('textContent'); |
1585 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1586 |
|
|
|
1587 |
|
|
$test->id ('dtdText'); |
1588 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '&;'); |
1589 |
|
|
|
1590 |
|
|
@Method: |
1591 |
|
|
@@Name: createXDPPAttr |
1592 |
|
|
@@dlp:methodName: create_xdp_pattr |
1593 |
|
|
@@enDesc: |
1594 |
|
|
Creates a <XE::xdp|pattr> element. |
1595 |
|
|
@@Param: |
1596 |
|
|
@@@Name: name |
1597 |
|
|
@@@Type: DOMString |
1598 |
|
|
@@@enDesc: |
1599 |
|
|
The name of the pseudo-attribute. |
1600 |
|
|
@@@nullCase: |
1601 |
|
|
@@@@enDesc: |
1602 |
|
|
Same as an empty string. |
1603 |
|
|
@@Param: |
1604 |
|
|
@@@Name: value |
1605 |
|
|
@@@Type: DOMString |
1606 |
|
|
@@@enDesc: |
1607 |
|
|
The value of the pseudo-attribute. |
1608 |
|
|
@@@nullCase: |
1609 |
|
|
@@@@enDesc: |
1610 |
|
|
Same as an empty string. |
1611 |
|
|
@@Return: |
1612 |
|
|
@@@Type: XDPPAttrElement |
1613 |
|
|
@@@enDesc: |
1614 |
|
|
The newly created element node. |
1615 |
|
|
|
1616 |
|
|
{P:: A new <IF::Element> node with following attributes |
1617 |
|
|
<kwd:MUST> be returned: |
1618 |
|
|
|
1619 |
|
|
- <A::Node.localName>::: <XE::pattr>. |
1620 |
|
|
|
1621 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1622 |
|
|
|
1623 |
|
|
- <A::Node.ownerDocument>::: The document. |
1624 |
|
|
|
1625 |
|
|
{LI:: <A::Node.childNodes>::: A new <IF::tc|NodeList> with |
1626 |
|
|
three nodes in this order: |
1627 |
|
|
|
1628 |
|
|
{OLI:: |
1629 |
|
|
|
1630 |
|
|
- <A::Node.localName>::: <XE::name>. |
1631 |
|
|
|
1632 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1633 |
|
|
|
1634 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1635 |
|
|
|
1636 |
|
|
- <A::Node.ownerDocument>::: The document. |
1637 |
|
|
|
1638 |
|
|
- <A::Node.textContent>::: <P::name>, or an empty |
1639 |
|
|
string if <P::name> is <DOM::null>. |
1640 |
|
|
|
1641 |
|
|
} |
1642 |
|
|
|
1643 |
|
|
{OLI:: |
1644 |
|
|
|
1645 |
|
|
- <A::Node.localName>::: <XE::delimiter>. |
1646 |
|
|
|
1647 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1648 |
|
|
|
1649 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1650 |
|
|
|
1651 |
|
|
- <A::Node.ownerDocument>::: The document. |
1652 |
|
|
|
1653 |
|
|
- <A::Node.textContent>::: <XML::=>. |
1654 |
|
|
|
1655 |
|
|
} |
1656 |
|
|
|
1657 |
|
|
{OLI:: |
1658 |
|
|
|
1659 |
|
|
- <A::Node.localName>::: <XE::attr-literal>. |
1660 |
|
|
|
1661 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1662 |
|
|
|
1663 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1664 |
|
|
|
1665 |
|
|
- <A::Node.ownerDocument>::: The document. |
1666 |
|
|
|
1667 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
1668 |
|
|
string if <P::value> is <DOM::null>. |
1669 |
|
|
|
1670 |
|
|
} |
1671 |
|
|
|
1672 |
|
|
} |
1673 |
|
|
|
1674 |
|
|
} |
1675 |
|
|
|
1676 |
|
|
If a <IF::Text> node is created, its |
1677 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
1678 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1679 |
|
|
@@@PerlDef: |
1680 |
|
|
__DEEP{ |
1681 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'pattr'); |
1682 |
|
|
my $name_el = $self-><M::XDPDocument.createXDPName> ($name); |
1683 |
|
|
$r-><M::Node.appendChild> ($name_el); |
1684 |
|
|
my $vi_el = $self-><M::XDPDocument.createXDPDelimiter> ('='); |
1685 |
|
|
$r-><M::Node.appendChild> ($vi_el); |
1686 |
|
|
my $value_el = $self-><M::XDPDocument.createXDPAttrLiteral> ($value); |
1687 |
|
|
$r-><M::Node.appendChild> ($value_el); |
1688 |
|
|
}__; |
1689 |
|
|
|
1690 |
|
|
@@Test: |
1691 |
|
|
@@@QName: XDPDocument.createXDPPAttr.1.test |
1692 |
|
|
@@@PerlDef: |
1693 |
|
|
my $doc; |
1694 |
|
|
__CODE{createXDPDocumentForTest}__; |
1695 |
|
|
|
1696 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPAttr> ('paname' => 'pavalue'); |
1697 |
|
|
|
1698 |
|
|
$test->id ('interface'); |
1699 |
|
|
$test->assert_isa ($el, <IFName::XDPPAttrElement>); |
1700 |
|
|
|
1701 |
|
|
$test->id ('namespaceURI'); |
1702 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1703 |
|
|
|
1704 |
|
|
$test->id ('localName'); |
1705 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pattr'); |
1706 |
|
|
|
1707 |
|
|
$test->id ('dtdText'); |
1708 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'paname="pavalue"'); |
1709 |
|
|
@@Test: |
1710 |
|
|
@@@QName: XDPDocument.createXDPPAttr.2.test |
1711 |
|
|
@@@PerlDef: |
1712 |
|
|
my $doc; |
1713 |
|
|
__CODE{createXDPDocumentForTest}__; |
1714 |
|
|
|
1715 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPAttr> (null, null); |
1716 |
|
|
|
1717 |
|
|
$test->id ('interface'); |
1718 |
|
|
$test->assert_isa ($el, <IFName::XDPPAttrElement>); |
1719 |
|
|
|
1720 |
|
|
$test->id ('namespaceURI'); |
1721 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1722 |
|
|
|
1723 |
|
|
$test->id ('localName'); |
1724 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pattr'); |
1725 |
|
|
|
1726 |
|
|
$test->id ('dtdText'); |
1727 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '=""'); |
1728 |
|
|
|
1729 |
|
|
@Method: |
1730 |
|
|
@@Name: createXDPTextDecl |
1731 |
|
|
@@enDesc: |
1732 |
|
|
Creates a <XE::xdp|text-decl> element. |
1733 |
|
|
@@Param: |
1734 |
|
|
@@@Name: version |
1735 |
|
|
@@@Type: DOMString |
1736 |
|
|
@@@enDesc: |
1737 |
|
|
The value of the <XA::version> pseudo-attribute of |
1738 |
|
|
the text declaration. |
1739 |
|
|
@@@nullCase: |
1740 |
|
|
@@@@enDesc: |
1741 |
|
|
If <P::encoding> is also <DOM::null>, it is treated |
1742 |
|
|
as if <XML::1.0> is specified. Otherwise, |
1743 |
|
|
no <XA::version> pseudo-attribute will appear. |
1744 |
|
|
@@Param: |
1745 |
|
|
@@@Name: encoding |
1746 |
|
|
@@@Type: DOMString |
1747 |
|
|
@@@enDesc: |
1748 |
|
|
The value of the <XE::encoding> pseudo-attribute |
1749 |
|
|
of the text declaration. |
1750 |
|
|
@@@nullCase: |
1751 |
|
|
@@@@enDesc: |
1752 |
|
|
No <XA::encoding> pseudo-attribute will appear. |
1753 |
|
|
@@Return: |
1754 |
|
|
@@@Type: XDPTextDeclElement |
1755 |
|
|
@@@enDesc: |
1756 |
|
|
The newly created element node. |
1757 |
|
|
|
1758 |
|
|
{P:: A new <IF::Element> node with following attributes |
1759 |
|
|
<kwd:MUST> be returned: |
1760 |
|
|
|
1761 |
|
|
- <A::Node.localName>::: <XE::text-decl>. |
1762 |
|
|
|
1763 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1764 |
|
|
|
1765 |
|
|
- <A::Node.ownerDocument>::: The document. |
1766 |
|
|
|
1767 |
|
|
} |
1768 |
|
|
|
1769 |
|
|
{P:: In addition, the returned node <kwd:MUST> have following |
1770 |
|
|
child nodes in order: |
1771 |
|
|
|
1772 |
|
|
= If <P::version> is different from <DOM::null> and / or |
1773 |
|
|
if <P::encoding> is <DOM::null>, an <CODE::S> node. |
1774 |
|
|
|
1775 |
|
|
= If <P::version> is different from <DOM::null> and / or |
1776 |
|
|
if <P::encoding> is <DOM::null>, a pseudo-attribute |
1777 |
|
|
node whose <VAR::name> is <XA::version> and |
1778 |
|
|
whose <VAR::value> is <P::version>, if it is |
1779 |
|
|
not <DOM::null>, or <XML::1.0>, otherwise. |
1780 |
|
|
|
1781 |
|
|
= An <CODE::S> node. |
1782 |
|
|
|
1783 |
|
|
= If <P::encoding> is different from <DOM::null>, |
1784 |
|
|
a pseudo-attribute node whose <VAR::name> is |
1785 |
|
|
<XA::encoding> and whose <VAR::value> is <P::encoding>. |
1786 |
|
|
|
1787 |
|
|
} |
1788 |
|
|
|
1789 |
|
|
{P:: <DFN::An <CODE::S> node> <kwd:MUST> be a <IF::Node> |
1790 |
|
|
that contains following attribute values: |
1791 |
|
|
|
1792 |
|
|
- <A::Node.localName>::: <XE::s>. |
1793 |
|
|
|
1794 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1795 |
|
|
|
1796 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1797 |
|
|
|
1798 |
|
|
- <A::Node.ownerDocument>::: The document. |
1799 |
|
|
|
1800 |
|
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
1801 |
|
|
|
1802 |
|
|
} |
1803 |
|
|
|
1804 |
|
|
<DFN::A pseudo-attribute node> with <VAR::name> and |
1805 |
|
|
<VAR::value> <kwd:MUST> be a <IF::Node> that would be |
1806 |
|
|
returned when the <A::XDPDocument.createXDPPAttr> method |
1807 |
|
|
on the document with parameters <VAR::name> and <VAR::value> |
1808 |
|
|
were invoked. |
1809 |
|
|
|
1810 |
|
|
If a <IF::Text> node is created, its |
1811 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
1812 |
|
|
<kwd:MUST> be set to <DOM::false>. |
1813 |
|
|
@@@PerlDef: |
1814 |
|
|
__DEEP{ |
1815 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'text-decl'); |
1816 |
|
|
if (defined $version or not defined $encoding) { |
1817 |
|
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
1818 |
|
|
my $ver_el = $self-><M::XDPDocument.createXDPPAttr> |
1819 |
|
|
(version => defined $version |
1820 |
|
|
? $version : '1.0'); |
1821 |
|
|
$r-><M::Node.appendChild> ($ver_el); |
1822 |
|
|
} |
1823 |
|
|
if (defined $encoding) { |
1824 |
|
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
1825 |
|
|
my $enc_el = $self-><M::XDPDocument.createXDPPAttr> |
1826 |
|
|
(encoding => $encoding); |
1827 |
|
|
$r-><M::Node.appendChild> ($enc_el); |
1828 |
|
|
} |
1829 |
|
|
}__; |
1830 |
|
|
|
1831 |
|
|
@@Test: |
1832 |
|
|
@@@QName: XDPDocument.createXDPTextDecl.1.test |
1833 |
|
|
@@@PerlDef: |
1834 |
|
|
my $doc; |
1835 |
|
|
__CODE{createXDPDocumentForTest}__; |
1836 |
|
|
|
1837 |
|
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> ('1.1', 'utf-8'); |
1838 |
|
|
|
1839 |
|
|
$test->id ('interface'); |
1840 |
|
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1841 |
|
|
|
1842 |
|
|
$test->id ('namespaceURI'); |
1843 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1844 |
|
|
|
1845 |
|
|
$test->id ('localName'); |
1846 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1847 |
|
|
|
1848 |
|
|
$test->id ('dtdText'); |
1849 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1850 |
|
|
'<?xml version="1.1" encoding="utf-8"?>'); |
1851 |
|
|
@@Test: |
1852 |
|
|
@@@QName: XDPDocument.createXDPTextDecl.2.test |
1853 |
|
|
@@@PerlDef: |
1854 |
|
|
my $doc; |
1855 |
|
|
__CODE{createXDPDocumentForTest}__; |
1856 |
|
|
|
1857 |
|
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> ('1.1'); |
1858 |
|
|
|
1859 |
|
|
$test->id ('interface'); |
1860 |
|
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1861 |
|
|
|
1862 |
|
|
$test->id ('namespaceURI'); |
1863 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1864 |
|
|
|
1865 |
|
|
$test->id ('localName'); |
1866 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1867 |
|
|
|
1868 |
|
|
$test->id ('dtdText'); |
1869 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1870 |
|
|
'<?xml version="1.1"?>'); |
1871 |
|
|
@@Test: |
1872 |
|
|
@@@QName: XDPDocument.createXDPTextDecl.3.test |
1873 |
|
|
@@@PerlDef: |
1874 |
|
|
my $doc; |
1875 |
|
|
__CODE{createXDPDocumentForTest}__; |
1876 |
|
|
|
1877 |
|
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> (null, 'utf-8'); |
1878 |
|
|
|
1879 |
|
|
$test->id ('interface'); |
1880 |
|
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1881 |
|
|
|
1882 |
|
|
$test->id ('namespaceURI'); |
1883 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1884 |
|
|
|
1885 |
|
|
$test->id ('localName'); |
1886 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1887 |
|
|
|
1888 |
|
|
$test->id ('dtdText'); |
1889 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1890 |
|
|
'<?xml encoding="utf-8"?>'); |
1891 |
|
|
@@Test: |
1892 |
|
|
@@@QName: XDPDocument.createXDPTextDecl.4.test |
1893 |
|
|
@@@PerlDef: |
1894 |
|
|
my $doc; |
1895 |
|
|
__CODE{createXDPDocumentForTest}__; |
1896 |
|
|
|
1897 |
|
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl>; |
1898 |
|
|
|
1899 |
|
|
$test->id ('interface'); |
1900 |
|
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1901 |
|
|
|
1902 |
|
|
$test->id ('namespaceURI'); |
1903 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1904 |
|
|
|
1905 |
|
|
$test->id ('localName'); |
1906 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1907 |
|
|
|
1908 |
|
|
$test->id ('dtdText'); |
1909 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1910 |
|
|
'<?xml version="1.0"?>'); |
1911 |
|
|
|
1912 |
|
|
@Method: |
1913 |
|
|
@@Name: createXDPPI |
1914 |
|
|
@@dlp:methodName: create_xdp_pi |
1915 |
|
|
@@enDesc: |
1916 |
|
|
Creates a <XE::xdp|pi> element. |
1917 |
|
|
@@Param: |
1918 |
|
|
@@@Name: target |
1919 |
|
|
@@@Type: DOMString |
1920 |
|
|
@@@enDesc: |
1921 |
|
|
The target of the processing instruction. |
1922 |
|
|
@@@nullCase: |
1923 |
|
|
@@@@enDesc: |
1924 |
|
|
Same as an empty string. |
1925 |
|
|
@@Param: |
1926 |
|
|
@@@Name: data |
1927 |
|
|
@@@Type: DOMString |
1928 |
|
|
@@@enDesc: |
1929 |
|
|
The content of the processing instruction. |
1930 |
|
|
@@@nullCase: |
1931 |
|
|
@@@@enDesc: |
1932 |
|
|
No <CODE::S> is inserted after the target. |
1933 |
|
|
@@Return: |
1934 |
|
|
@@@Type: XDPPIElement |
1935 |
|
|
@@@enDesc: |
1936 |
|
|
The newly created element node. |
1937 |
|
|
|
1938 |
|
|
{P:: A new <IF::Element> node with following attributes |
1939 |
|
|
<kwd:MUST> be returned: |
1940 |
|
|
|
1941 |
|
|
- <A::Node.localName>::: <XE::pi>. |
1942 |
|
|
|
1943 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1944 |
|
|
|
1945 |
|
|
- <A::Node.ownerDocument>::: The document. |
1946 |
|
|
|
1947 |
|
|
} |
1948 |
|
|
|
1949 |
|
|
If the <P::value> is different from <DOM::null>, |
1950 |
|
|
the returned value <kwd:MUST> contain two or three child |
1951 |
|
|
element nodes: the target node, an <CODE::S> node, |
1952 |
|
|
and if the length of <P::value> is greater than zero, |
1953 |
|
|
the data node. Otherwise, it <kwd:MUST> contain |
1954 |
|
|
one child element node: the target node. |
1955 |
|
|
|
1956 |
|
|
{P:: <DFM::The target node> <kwd:MUST> be a <IF::Node> |
1957 |
|
|
that contains following attribute values: |
1958 |
|
|
|
1959 |
|
|
- <A::Node.localName>::: <XE::name>. |
1960 |
|
|
|
1961 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1962 |
|
|
|
1963 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1964 |
|
|
|
1965 |
|
|
- <A::Node.ownerDocument>::: The document. |
1966 |
|
|
|
1967 |
|
|
- <A::Node.textContent>::: <P::target>, or an empty |
1968 |
|
|
string if <P::target> is <DOM::null>. |
1969 |
|
|
|
1970 |
|
|
} |
1971 |
|
|
|
1972 |
|
|
{P:: <DFN::An <CODE::S> node> <kwd:MUST> be a <IF::Node> |
1973 |
|
|
that contains following attribute values: |
1974 |
|
|
|
1975 |
|
|
- <A::Node.localName>::: <XE::s>. |
1976 |
|
|
|
1977 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1978 |
|
|
|
1979 |
|
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1980 |
|
|
|
1981 |
|
|
- <A::Node.ownerDocument>::: The document. |
1982 |
|
|
|
1983 |
|
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
1984 |
|
|
|
1985 |
|
|
} |
1986 |
|
|
|
1987 |
|
|
{P:: <DFM::The data node> <kwd:MUST> be a <IF::Node> |
1988 |
|
|
that contains following attribute values: |
1989 |
|
|
|
1990 |
|
|
- <A::Node.nodeType>::: <C::Node.TEXT_NODE>. |
1991 |
|
|
|
1992 |
|
|
- <A::Node.ownerDocument>::: The document. |
1993 |
|
|
|
1994 |
|
|
- <A::Node.textContent>::: <P::data>. |
1995 |
|
|
|
1996 |
|
|
} |
1997 |
|
|
|
1998 |
|
|
If a <IF::Text> node are created, its |
1999 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
2000 |
|
|
<kwd:MUST> be set to <DOM::false>. |
2001 |
|
|
@@@PerlDef: |
2002 |
|
|
__DEEP{ |
2003 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'pi'); |
2004 |
|
|
$r-><M::Node.appendChild> |
2005 |
|
|
($self-><M::XDPDocument.createXDPName> ($target)); |
2006 |
|
|
if (defined $data) { |
2007 |
|
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
2008 |
|
|
$r-><M::Node.manakaiAppendText> ($data) if length $data; |
2009 |
|
|
} |
2010 |
|
|
}__; |
2011 |
|
|
|
2012 |
|
|
@@Test: |
2013 |
|
|
@@@QName: XDPDocument.createXDPPI.1.test |
2014 |
|
|
@@@PerlDef: |
2015 |
|
|
my $doc; |
2016 |
|
|
__CODE{createXDPDocumentForTest}__; |
2017 |
|
|
|
2018 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPI> ('pitarget', 'pidata'); |
2019 |
|
|
|
2020 |
|
|
$test->id ('interface'); |
2021 |
|
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2022 |
|
|
|
2023 |
|
|
$test->id ('namespaceURI'); |
2024 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2025 |
|
|
|
2026 |
|
|
$test->id ('localName'); |
2027 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2028 |
|
|
|
2029 |
|
|
$test->id ('dtdText'); |
2030 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2031 |
|
|
'<?pitarget pidata?>'); |
2032 |
|
|
|
2033 |
|
|
$test->id ('length'); |
2034 |
|
|
$test->assert_num_equals |
2035 |
|
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2036 |
|
|
expected_value => 3); |
2037 |
|
|
@@Test: |
2038 |
|
|
@@@QName: XDPDocument.createXDPPI.2.test |
2039 |
|
|
@@@PerlDef: |
2040 |
|
|
my $doc; |
2041 |
|
|
__CODE{createXDPDocumentForTest}__; |
2042 |
|
|
|
2043 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPI> ('pitarget'); |
2044 |
|
|
|
2045 |
|
|
$test->id ('interface'); |
2046 |
|
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2047 |
|
|
|
2048 |
|
|
$test->id ('namespaceURI'); |
2049 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2050 |
|
|
|
2051 |
|
|
$test->id ('localName'); |
2052 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2053 |
|
|
|
2054 |
|
|
$test->id ('dtdText'); |
2055 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2056 |
|
|
'<?pitarget?>'); |
2057 |
|
|
|
2058 |
|
|
$test->id ('length'); |
2059 |
|
|
$test->assert_num_equals |
2060 |
|
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2061 |
|
|
expected_value => 1); |
2062 |
|
|
@@Test: |
2063 |
|
|
@@@QName: XDPDocument.createXDPPI.3.test |
2064 |
|
|
@@@PerlDef: |
2065 |
|
|
my $doc; |
2066 |
|
|
__CODE{createXDPDocumentForTest}__; |
2067 |
|
|
|
2068 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPI> (null, 'pidata'); |
2069 |
|
|
|
2070 |
|
|
$test->id ('interface'); |
2071 |
|
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2072 |
|
|
|
2073 |
|
|
$test->id ('namespaceURI'); |
2074 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2075 |
|
|
|
2076 |
|
|
$test->id ('localName'); |
2077 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2078 |
|
|
|
2079 |
|
|
$test->id ('dtdText'); |
2080 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2081 |
|
|
'<? pidata?>'); |
2082 |
|
|
|
2083 |
|
|
$test->id ('length'); |
2084 |
|
|
$test->assert_num_equals |
2085 |
|
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2086 |
|
|
expected_value => 3); |
2087 |
|
|
@@Test: |
2088 |
|
|
@@@QName: XDPDocument.createXDPPI.4.test |
2089 |
|
|
@@@PerlDef: |
2090 |
|
|
my $doc; |
2091 |
|
|
__CODE{createXDPDocumentForTest}__; |
2092 |
|
|
|
2093 |
|
|
my $el = $doc-><M::XDPDocument.createXDPPI>; |
2094 |
|
|
|
2095 |
|
|
$test->id ('interface'); |
2096 |
|
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2097 |
|
|
|
2098 |
|
|
$test->id ('namespaceURI'); |
2099 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2100 |
|
|
|
2101 |
|
|
$test->id ('localName'); |
2102 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2103 |
|
|
|
2104 |
|
|
$test->id ('dtdText'); |
2105 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<??>'); |
2106 |
|
|
|
2107 |
|
|
$test->id ('length'); |
2108 |
|
|
$test->assert_num_equals |
2109 |
|
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2110 |
|
|
expected_value => 1); |
2111 |
|
|
|
2112 |
|
|
@Method: |
2113 |
|
|
@@Name: createXDPComment |
2114 |
|
|
@@enDesc: |
2115 |
|
|
Creates a <XE::xdp|comment> element. |
2116 |
|
|
@@Param: |
2117 |
|
|
@@@Name: value |
2118 |
|
|
@@@Type: DOMString |
2119 |
|
|
@@@enDesc: |
2120 |
|
|
The value of the element, i.e. the content of the comment. |
2121 |
|
|
@@@nullCase: |
2122 |
|
|
@@@@enDesc: |
2123 |
|
|
Same as an empty string. |
2124 |
|
|
@@Return: |
2125 |
|
|
@@@Type: XDPCommentElement |
2126 |
|
|
@@@enDesc: |
2127 |
|
|
The newly created element node. |
2128 |
|
|
|
2129 |
|
|
{P:: A new <IF::Element> node with following attributes |
2130 |
|
|
<kwd:MUST> be returned: |
2131 |
|
|
|
2132 |
|
|
- <A::Node.localName>::: <XE::comment>. |
2133 |
|
|
|
2134 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2135 |
|
|
|
2136 |
|
|
- <A::Node.ownerDocument>::: The document. |
2137 |
|
|
|
2138 |
|
|
- <A::Node.textContent>::: <P::value>, or an empty |
2139 |
|
|
string if <P::value> is <DOM::null>. |
2140 |
|
|
|
2141 |
|
|
} |
2142 |
|
|
|
2143 |
|
|
If a <IF::Text> node is created, its |
2144 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
2145 |
|
|
<kwd:MUST> be set to <DOM::false>. |
2146 |
|
|
@@@PerlDef: |
2147 |
|
|
__DEEP{ |
2148 |
|
|
$r = $self-><M::Document.createElementNS> |
2149 |
|
|
(<Q::xdp|>, 'comment'); |
2150 |
|
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
2151 |
|
|
}__; |
2152 |
|
|
|
2153 |
|
|
@@Test: |
2154 |
|
|
@@@QName: XDPDocument.createXDPComment.1.test |
2155 |
|
|
@@@PerlDef: |
2156 |
|
|
my $doc; |
2157 |
|
|
__CODE{createXDPDocumentForTest}__; |
2158 |
|
|
|
2159 |
|
|
my $value = q<pename>; |
2160 |
|
|
my $el = $doc-><M::XDPDocument.createXDPComment> ($value); |
2161 |
|
|
|
2162 |
|
|
$test->id ('interface'); |
2163 |
|
|
$test->assert_isa ($el, <IFName::XDPCommentElement>); |
2164 |
|
|
|
2165 |
|
|
$test->id ('namespaceURI'); |
2166 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2167 |
|
|
|
2168 |
|
|
$test->id ('localName'); |
2169 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'comment'); |
2170 |
|
|
|
2171 |
|
|
$test->id ('textContent'); |
2172 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
2173 |
|
|
|
2174 |
|
|
$test->id ('dtdText'); |
2175 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2176 |
|
|
'<!--'.$value.'-->'); |
2177 |
|
|
@@Test: |
2178 |
|
|
@@@QName: XDPDocument.createXDPComment.2.test |
2179 |
|
|
@@@PerlDef: |
2180 |
|
|
my $doc; |
2181 |
|
|
__CODE{createXDPDocumentForTest}__; |
2182 |
|
|
|
2183 |
|
|
my $el = $doc-><M::XDPDocument.createXDPComment> (null); |
2184 |
|
|
|
2185 |
|
|
$test->id ('interface'); |
2186 |
|
|
$test->assert_isa ($el, <IFName::XDPCommentElement>); |
2187 |
|
|
|
2188 |
|
|
$test->id ('namespaceURI'); |
2189 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2190 |
|
|
|
2191 |
|
|
$test->id ('localName'); |
2192 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'comment'); |
2193 |
|
|
|
2194 |
|
|
$test->id ('textContent'); |
2195 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
2196 |
|
|
|
2197 |
|
|
$test->id ('dtdText'); |
2198 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!---->'); |
2199 |
|
|
|
2200 |
|
|
@Method: |
2201 |
|
|
@@Name: createXDPMarkedSectionStatus |
2202 |
|
|
@@enDesc: |
2203 |
|
|
Creates a <XE::xdp|marked-section-status> element. |
2204 |
|
|
@@Param: |
2205 |
|
|
@@@Name: value |
2206 |
|
|
@@@Type: DOMString |
2207 |
|
|
@@@enDesc: |
2208 |
|
|
The value of the element. |
2209 |
|
|
@@@nullCase: |
2210 |
|
|
@@@@enDesc: |
2211 |
|
|
Same as an empty string. |
2212 |
|
|
@@Return: |
2213 |
|
|
@@@Type: XDPMarkedSectionStatusElement |
2214 |
|
|
@@@enDesc: |
2215 |
|
|
The newly created element node. |
2216 |
|
|
|
2217 |
|
|
{P:: A new <IF::Element> node with following attributes |
2218 |
|
|
<kwd:MUST> be returned: |
2219 |
|
|
|
2220 |
|
|
- <A::Node.localName>::: <XE::marked-section-status>. |
2221 |
|
|
|
2222 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2223 |
|
|
|
2224 |
|
|
- <A::Node.ownerDocument>::: The document. |
2225 |
|
|
|
2226 |
|
|
} |
2227 |
|
|
|
2228 |
|
|
{P:: If <P::value> is not <DOM::null> and its length |
2229 |
|
|
is greater than zero, the returned node <kwd:MUST> |
2230 |
|
|
contain a <IF::Element> with following attributes: |
2231 |
|
|
|
2232 |
|
|
- <A::Node.localName>::: <XE::keyword>. |
2233 |
|
|
|
2234 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2235 |
|
|
|
2236 |
|
|
- <A::Node.ownerDocument>::: The document. |
2237 |
|
|
|
2238 |
|
|
- <A::Node.textContent>::: <P::value>. |
2239 |
|
|
|
2240 |
|
|
} |
2241 |
|
|
|
2242 |
|
|
If a <IF::Text> node is created, its |
2243 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
2244 |
|
|
<kwd:MUST> be set to <DOM::false>. |
2245 |
|
|
@@@PerlDef: |
2246 |
|
|
__DEEP{ |
2247 |
|
|
$r = $self-><M::Document.createElementNS> |
2248 |
|
|
(<Q::xdp|>, 'marked-section-status'); |
2249 |
|
|
if (defined $value and length $value) { |
2250 |
|
|
$r-><M::Node.appendChild> |
2251 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ($value)); |
2252 |
|
|
} |
2253 |
|
|
}__; |
2254 |
|
|
|
2255 |
|
|
@@Test: |
2256 |
|
|
@@@QName: XDPDocument.createXDPMarkedSectionStatus.1.test |
2257 |
|
|
@@@PerlDef: |
2258 |
|
|
my $doc; |
2259 |
|
|
__CODE{createXDPDocumentForTest}__; |
2260 |
|
|
|
2261 |
|
|
my $value = q<INCLUDE>; |
2262 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSectionStatus> ($value); |
2263 |
|
|
|
2264 |
|
|
$test->id ('interface'); |
2265 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionStatusElement>); |
2266 |
|
|
|
2267 |
|
|
$test->id ('namespaceURI'); |
2268 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2269 |
|
|
|
2270 |
|
|
$test->id ('localName'); |
2271 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, |
2272 |
|
|
'marked-section-status'); |
2273 |
|
|
|
2274 |
|
|
$test->id ('textContent'); |
2275 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
2276 |
|
|
|
2277 |
|
|
$test->id ('dtdText'); |
2278 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value.'['); |
2279 |
|
|
@@Test: |
2280 |
|
|
@@@QName: XDPDocument.createXDPMarkedSectionStatus.2.test |
2281 |
|
|
@@@PerlDef: |
2282 |
|
|
my $doc; |
2283 |
|
|
__CODE{createXDPDocumentForTest}__; |
2284 |
|
|
|
2285 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSectionStatus> (null); |
2286 |
|
|
|
2287 |
|
|
$test->id ('interface'); |
2288 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionStatusElement>); |
2289 |
|
|
|
2290 |
|
|
$test->id ('namespaceURI'); |
2291 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2292 |
|
|
|
2293 |
|
|
$test->id ('localName'); |
2294 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, |
2295 |
|
|
'marked-section-status'); |
2296 |
|
|
|
2297 |
|
|
$test->id ('textContent'); |
2298 |
|
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
2299 |
|
|
|
2300 |
|
|
$test->id ('dtdText'); |
2301 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '['); |
2302 |
|
|
|
2303 |
|
|
@Method: |
2304 |
|
|
@@Name: createXDPMarkedSection |
2305 |
|
|
@@enDesc: |
2306 |
|
|
Creates a <XE::xdp|marked-section> element. |
2307 |
|
|
@@Param: |
2308 |
|
|
@@@Name: status |
2309 |
|
|
@@@Type: DOMString |
2310 |
|
|
@@@enDesc: |
2311 |
|
|
The status value of the marked section. |
2312 |
|
|
@@@nullCase: |
2313 |
|
|
@@@@enDesc: |
2314 |
|
|
Same as an empty string. |
2315 |
|
|
@@Param: |
2316 |
|
|
@@@Name: value |
2317 |
|
|
@@@Type: DOMString |
2318 |
|
|
@@@enDesc: |
2319 |
|
|
The value of the marked section. |
2320 |
|
|
@@@nullCase: |
2321 |
|
|
@@@@enDesc: |
2322 |
|
|
Same as an empty string. |
2323 |
|
|
@@Return: |
2324 |
|
|
@@@Type: XDPMarkedSectionElement |
2325 |
|
|
@@@enDesc: |
2326 |
|
|
The newly created element node. |
2327 |
|
|
|
2328 |
|
|
{P:: A new <IF::Element> node with following attributes |
2329 |
|
|
<kwd:MUST> be returned: |
2330 |
|
|
|
2331 |
|
|
- <A::Node.localName>::: <XE::marked-section>. |
2332 |
|
|
|
2333 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2334 |
|
|
|
2335 |
|
|
- <A::Node.ownerDocument>::: The document. |
2336 |
|
|
|
2337 |
|
|
} |
2338 |
|
|
|
2339 |
|
|
The returned <IF::Element> node <kwd:MUST> contain |
2340 |
|
|
a child node that would be returned when the |
2341 |
|
|
<M::XDPDocument.createXDPMarkedSectionStatus> method |
2342 |
|
|
on the document is invoked with <P::status> as a parameter. |
2343 |
|
|
|
2344 |
|
|
{P:: If <P::value> is not <DOM::null> and the length of |
2345 |
|
|
<P::value> is greater than zero, the |
2346 |
|
|
<XE::xdp|marked-section-status> <IF::Element> node |
2347 |
|
|
<kwd:MUST> have a <A::Node.nextSibling> <IF::Node> |
2348 |
|
|
with following attributes: |
2349 |
|
|
|
2350 |
|
|
- <A::Node.nodeType>::: <C::Node.TEXT_NODE>. |
2351 |
|
|
|
2352 |
|
|
- <A::Node.ownerDocument>::: The document. |
2353 |
|
|
|
2354 |
|
|
- <A::Node.textContent>::: <P::content>, or an empty |
2355 |
|
|
string if <P::content> is <DOM::null>. |
2356 |
|
|
|
2357 |
|
|
} |
2358 |
|
|
|
2359 |
|
|
If a <IF::Text> node is created, its |
2360 |
|
|
<A::Text.isElementContentWhitespace> attribute value |
2361 |
|
|
<kwd:MUST> be set to <DOM::false>. |
2362 |
|
|
@@@PerlDef: |
2363 |
|
|
__DEEP{ |
2364 |
|
|
$r = $self-><M::Document.createElementNS> |
2365 |
|
|
(<Q::xdp|>, 'marked-section'); |
2366 |
|
|
my $mss_el = $self-><M::XDPDocument.createXDPMarkedSectionStatus> |
2367 |
|
|
($status); |
2368 |
|
|
$r-><M::Node.appendChild> ($mss_el); |
2369 |
|
|
$r-><M::Node.manakaiAppendText> ($value) |
2370 |
|
|
if defined $value and length $value; |
2371 |
|
|
}__; |
2372 |
|
|
|
2373 |
|
|
@@Test: |
2374 |
|
|
@@@QName: XDPDocument.createXDPMarkedSection.1.test |
2375 |
|
|
@@@PerlDef: |
2376 |
|
|
my $doc; |
2377 |
|
|
__CODE{createXDPDocumentForTest}__; |
2378 |
|
|
|
2379 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> ('IGNORE', 'a'); |
2380 |
|
|
|
2381 |
|
|
$test->id ('interface'); |
2382 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2383 |
|
|
|
2384 |
|
|
$test->id ('namespaceURI'); |
2385 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2386 |
|
|
|
2387 |
|
|
$test->id ('localName'); |
2388 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2389 |
|
|
|
2390 |
|
|
$test->id ('dtdText'); |
2391 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![IGNORE[a]]>'); |
2392 |
|
|
@@Test: |
2393 |
|
|
@@@QName: XDPDocument.createXDPMarkedSection.2.test |
2394 |
|
|
@@@PerlDef: |
2395 |
|
|
my $doc; |
2396 |
|
|
__CODE{createXDPDocumentForTest}__; |
2397 |
|
|
|
2398 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> ('IGNORE'); |
2399 |
|
|
|
2400 |
|
|
$test->id ('interface'); |
2401 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2402 |
|
|
|
2403 |
|
|
$test->id ('namespaceURI'); |
2404 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2405 |
|
|
|
2406 |
|
|
$test->id ('localName'); |
2407 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2408 |
|
|
|
2409 |
|
|
$test->id ('dtdText'); |
2410 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![IGNORE[]]>'); |
2411 |
|
|
@@Test: |
2412 |
|
|
@@@QName: XDPDocument.createXDPMarkedSection.3.test |
2413 |
|
|
@@@PerlDef: |
2414 |
|
|
my $doc; |
2415 |
|
|
__CODE{createXDPDocumentForTest}__; |
2416 |
|
|
|
2417 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> (null, 'a'); |
2418 |
|
|
|
2419 |
|
|
$test->id ('interface'); |
2420 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2421 |
|
|
|
2422 |
|
|
$test->id ('namespaceURI'); |
2423 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2424 |
|
|
|
2425 |
|
|
$test->id ('localName'); |
2426 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2427 |
|
|
|
2428 |
|
|
$test->id ('dtdText'); |
2429 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![[a]]>'); |
2430 |
|
|
@@Test: |
2431 |
|
|
@@@QName: XDPDocument.createXDPMarkedSection.4.test |
2432 |
|
|
@@@PerlDef: |
2433 |
|
|
my $doc; |
2434 |
|
|
__CODE{createXDPDocumentForTest}__; |
2435 |
|
|
|
2436 |
|
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection>; |
2437 |
|
|
|
2438 |
|
|
$test->id ('interface'); |
2439 |
|
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2440 |
|
|
|
2441 |
|
|
$test->id ('namespaceURI'); |
2442 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2443 |
|
|
|
2444 |
|
|
$test->id ('localName'); |
2445 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2446 |
|
|
|
2447 |
|
|
$test->id ('dtdText'); |
2448 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![[]]>'); |
2449 |
|
|
|
2450 |
|
|
@Method: |
2451 |
|
|
@@Name: createXDPNotation |
2452 |
|
|
@@enDesc: |
2453 |
|
|
Creates a <XE::xdp|notation> element. |
2454 |
|
|
@@Param: |
2455 |
|
|
@@@Name: name |
2456 |
|
|
@@@Type: DOMString |
2457 |
|
|
@@@enDesc: |
2458 |
|
|
The name of the declaration. |
2459 |
|
|
@@@nullCase: |
2460 |
|
|
@@@@enDesc: |
2461 |
|
|
All parameters are ignored. |
2462 |
|
|
@@Param: |
2463 |
|
|
@@@Name: publicId |
2464 |
|
|
@@@Type: DOMString |
2465 |
|
|
@@@enDesc: |
2466 |
|
|
The public identifier in the declaration. |
2467 |
|
|
@@@nullCase: |
2468 |
|
|
@@@@enDesc: |
2469 |
|
|
No public identifier. |
2470 |
|
|
@@Param: |
2471 |
|
|
@@@Name: systemId |
2472 |
|
|
@@@Type: DOMString |
2473 |
|
|
@@@enDesc: |
2474 |
|
|
The system identifier in the declaration. |
2475 |
|
|
@@@nullCase: |
2476 |
|
|
@@@@enDesc: |
2477 |
|
|
No system identifier. |
2478 |
|
|
@@Return: |
2479 |
|
|
@@@Type: XDPNotationElement |
2480 |
|
|
@@@enDesc: |
2481 |
|
|
The newly created element node. |
2482 |
|
|
|
2483 |
|
|
{P:: A new <IF::Element> node with following attributes |
2484 |
|
|
<kwd:MUST> be returned: |
2485 |
|
|
|
2486 |
|
|
- <A::Node.localName>::: <XE::notation>. |
2487 |
|
|
|
2488 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2489 |
|
|
|
2490 |
|
|
- <A::Node.ownerDocument>::: The document. |
2491 |
|
|
|
2492 |
|
|
} |
2493 |
|
|
|
2494 |
|
|
{P:: A series of nodes <kwd:MUST> be associated to the returned |
2495 |
|
|
node as if the following algorithm were applied: |
2496 |
|
|
|
2497 |
|
|
= If <P::name> is <DOM::null>, stop the algorithm. |
2498 |
|
|
|
2499 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2500 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2501 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2502 |
|
|
|
2503 |
|
|
= Create a node by <M::XDPDocument.createXDPName> on the document |
2504 |
|
|
with <P::name> as a parameter and append the |
2505 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2506 |
|
|
|
2507 |
|
|
{OLI:: If <P::publicId> is different from <DOM::null>, |
2508 |
|
|
|
2509 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2510 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2511 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2512 |
|
|
|
2513 |
|
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2514 |
|
|
on the document with a string <XML::PUBLIC> as |
2515 |
|
|
a parameter and append the |
2516 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2517 |
|
|
|
2518 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2519 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2520 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2521 |
|
|
|
2522 |
|
|
= Create a node by <M::XDPDocument.createXDPMinimumLiteral> |
2523 |
|
|
on the document with <P::publicId> as a parameter |
2524 |
|
|
and append the node to the returned element by |
2525 |
|
|
the <M::Node.appendChild> method. |
2526 |
|
|
|
2527 |
|
|
} |
2528 |
|
|
|
2529 |
|
|
{OLI:: If <P::systemId> is different from <DOM::null> and |
2530 |
|
|
<P::publicId> is <DOM::null>, |
2531 |
|
|
|
2532 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2533 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2534 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2535 |
|
|
|
2536 |
|
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2537 |
|
|
on the document with a string <XML::SYSTEM> as |
2538 |
|
|
a parameter and append the |
2539 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2540 |
|
|
|
2541 |
|
|
} |
2542 |
|
|
|
2543 |
|
|
{OLI:: If <P::systemId> is different from <DOM::null> and |
2544 |
|
|
<P::publicId> is <DOM::null>, |
2545 |
|
|
|
2546 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2547 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2548 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2549 |
|
|
|
2550 |
|
|
= Create a node by <M::XDPDocument.createXDPSystemLiteral> |
2551 |
|
|
on the document with <P::systemId> as a parameter |
2552 |
|
|
and append the node to the returned element by |
2553 |
|
|
the <M::Node.appendChild> method. |
2554 |
|
|
|
2555 |
|
|
} |
2556 |
|
|
|
2557 |
|
|
} |
2558 |
|
|
@@@PerlDef: |
2559 |
|
|
__DEEP{ |
2560 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'notation'); |
2561 |
|
|
if (defined $name) { |
2562 |
|
|
$r-><M::Node.appendChild> |
2563 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2564 |
|
|
$r-><M::Node.appendChild> |
2565 |
|
|
($self-><M::XDPDocument.createXDPName> ($name)); |
2566 |
|
|
|
2567 |
|
|
if (defined $publicId) { |
2568 |
|
|
$r-><M::Node.appendChild> |
2569 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2570 |
|
|
$r-><M::Node.appendChild> |
2571 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ('PUBLIC')); |
2572 |
|
|
$r-><M::Node.appendChild> |
2573 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2574 |
|
|
$r-><M::Node.appendChild> |
2575 |
|
|
($self-><M::XDPDocument.createXDPMinimumLiteral> |
2576 |
|
|
($publicId)); |
2577 |
|
|
if (defined $systemId) { |
2578 |
|
|
$r-><M::Node.appendChild> |
2579 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2580 |
|
|
$r-><M::Node.appendChild> |
2581 |
|
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2582 |
|
|
($systemId)); |
2583 |
|
|
} |
2584 |
|
|
} elsif (defined $systemId) { |
2585 |
|
|
$r-><M::Node.appendChild> |
2586 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2587 |
|
|
$r-><M::Node.appendChild> |
2588 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ('SYSTEM')); |
2589 |
|
|
$r-><M::Node.appendChild> |
2590 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2591 |
|
|
$r-><M::Node.appendChild> |
2592 |
|
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2593 |
|
|
($systemId)); |
2594 |
|
|
} |
2595 |
|
|
} |
2596 |
|
|
}__; |
2597 |
|
|
|
2598 |
|
|
@@Test: |
2599 |
|
|
@@@QName: XDPDocument.createXDPNotation.1.test |
2600 |
|
|
@@@PerlDef: |
2601 |
|
|
my $doc; |
2602 |
|
|
__CODE{createXDPDocumentForTest}__; |
2603 |
|
|
|
2604 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2605 |
|
|
('iname', 'pubid', 'sysid'); |
2606 |
|
|
|
2607 |
|
|
$test->id ('interface'); |
2608 |
|
|
$test->assert_isa ($el, <IFName::XDPNotationElement>); |
2609 |
|
|
|
2610 |
|
|
$test->id ('namespaceURI'); |
2611 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2612 |
|
|
|
2613 |
|
|
$test->id ('localName'); |
2614 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'notation'); |
2615 |
|
|
|
2616 |
|
|
$test->id ('dtdText'); |
2617 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2618 |
|
|
'<!NOTATION iname PUBLIC "pubid" "sysid">'); |
2619 |
|
|
@@Test: |
2620 |
|
|
@@@QName: XDPDocument.createXDPNotation.2.test |
2621 |
|
|
@@@PerlDef: |
2622 |
|
|
my $doc; |
2623 |
|
|
__CODE{createXDPDocumentForTest}__; |
2624 |
|
|
|
2625 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2626 |
|
|
('iname', 'pubid'); |
2627 |
|
|
|
2628 |
|
|
$test->id ('dtdText'); |
2629 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2630 |
|
|
'<!NOTATION iname PUBLIC "pubid">'); |
2631 |
|
|
@@Test: |
2632 |
|
|
@@@QName: XDPDocument.createXDPNotation.3.test |
2633 |
|
|
@@@PerlDef: |
2634 |
|
|
my $doc; |
2635 |
|
|
__CODE{createXDPDocumentForTest}__; |
2636 |
|
|
|
2637 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2638 |
|
|
('iname'); |
2639 |
|
|
|
2640 |
|
|
$test->id ('dtdText'); |
2641 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2642 |
|
|
'<!NOTATION iname>'); |
2643 |
|
|
@@Test: |
2644 |
|
|
@@@QName: XDPDocument.createXDPNotation.4.test |
2645 |
|
|
@@@PerlDef: |
2646 |
|
|
my $doc; |
2647 |
|
|
__CODE{createXDPDocumentForTest}__; |
2648 |
|
|
|
2649 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation>; |
2650 |
|
|
|
2651 |
|
|
$test->id ('dtdText'); |
2652 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2653 |
|
|
'<!NOTATION>'); |
2654 |
|
|
@@Test: |
2655 |
|
|
@@@QName: XDPDocument.createXDPNotation.5.test |
2656 |
|
|
@@@PerlDef: |
2657 |
|
|
my $doc; |
2658 |
|
|
__CODE{createXDPDocumentForTest}__; |
2659 |
|
|
|
2660 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2661 |
|
|
('iname', null, 'sysid'); |
2662 |
|
|
|
2663 |
|
|
$test->id ('dtdText'); |
2664 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2665 |
|
|
'<!NOTATION iname SYSTEM "sysid">'); |
2666 |
|
|
@@Test: |
2667 |
|
|
@@@QName: XDPDocument.createXDPNotation.6.test |
2668 |
|
|
@@@PerlDef: |
2669 |
|
|
my $doc; |
2670 |
|
|
__CODE{createXDPDocumentForTest}__; |
2671 |
|
|
|
2672 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2673 |
|
|
(null, null, 'sysid'); |
2674 |
|
|
|
2675 |
|
|
$test->id ('dtdText'); |
2676 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2677 |
|
|
'<!NOTATION>'); |
2678 |
|
|
@@Test: |
2679 |
|
|
@@@QName: XDPDocument.createXDPNotation.7.test |
2680 |
|
|
@@@PerlDef: |
2681 |
|
|
my $doc; |
2682 |
|
|
__CODE{createXDPDocumentForTest}__; |
2683 |
|
|
|
2684 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2685 |
|
|
(null, 'pubid'); |
2686 |
|
|
|
2687 |
|
|
$test->id ('dtdText'); |
2688 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2689 |
|
|
'<!NOTATION>'); |
2690 |
|
|
@@Test: |
2691 |
|
|
@@@QName: XDPDocument.createXDPNotation.8.test |
2692 |
|
|
@@@PerlDef: |
2693 |
|
|
my $doc; |
2694 |
|
|
__CODE{createXDPDocumentForTest}__; |
2695 |
|
|
|
2696 |
|
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2697 |
|
|
(null, 'pubid', 'sysid'); |
2698 |
|
|
|
2699 |
|
|
$test->id ('dtdText'); |
2700 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2701 |
|
|
'<!NOTATION>'); |
2702 |
|
|
|
2703 |
|
|
@Method: |
2704 |
|
|
@@Name: createXDPEntity |
2705 |
|
|
@@enDesc: |
2706 |
|
|
Creates a <XE::xdp|entity> element. |
2707 |
|
|
@@Param: |
2708 |
|
|
@@@Name: isPE |
2709 |
|
|
@@@Type: boolean |
2710 |
|
|
@@@enDesc: |
2711 |
|
|
Whether the declaration declares a parameter entity or not. |
2712 |
|
|
@@@TrueCase: |
2713 |
|
|
@@@@enDesc: |
2714 |
|
|
The declaration declares a parameter entity. A <XML::%> |
2715 |
|
|
delimiter will be appended to the return node. |
2716 |
|
|
@@@FalseCase: |
2717 |
|
|
@@@@enDesc: |
2718 |
|
|
The declaration is not known to declare a parameter entity. |
2719 |
|
|
@@Param: |
2720 |
|
|
@@@Name: name |
2721 |
|
|
@@@Type: DOMString |
2722 |
|
|
@@@enDesc: |
2723 |
|
|
The name of the declaration. |
2724 |
|
|
@@@nullCase: |
2725 |
|
|
@@@@enDesc: |
2726 |
|
|
All parameters are ignored. |
2727 |
|
|
@@Param: |
2728 |
|
|
@@@Name: value |
2729 |
|
|
@@@Type: DOMString |
2730 |
|
|
@@@enDesc: |
2731 |
|
|
The literal replacement text of the declaration. |
2732 |
|
|
@@@nullCase: |
2733 |
|
|
@@@@enDesc: |
2734 |
|
|
Same as an empty string or no entity value in the declaration, |
2735 |
|
|
depending on whether the <P::publicId> parameters are <DOM::null> |
2736 |
|
|
or not. |
2737 |
|
|
@@Param: |
2738 |
|
|
@@@Name: publicId |
2739 |
|
|
@@@Type: DOMString |
2740 |
|
|
@@@enDesc: |
2741 |
|
|
The public identifier in the declaration. |
2742 |
|
|
@@@nullCase: |
2743 |
|
|
@@@@enDesc: |
2744 |
|
|
No public identifier. |
2745 |
|
|
@@Param: |
2746 |
|
|
@@@Name: systemId |
2747 |
|
|
@@@Type: DOMString |
2748 |
|
|
@@@enDesc: |
2749 |
|
|
The system identifier in the declaration. |
2750 |
|
|
@@@nullCase: |
2751 |
|
|
@@@@enDesc: |
2752 |
|
|
No system identifier. |
2753 |
|
|
@@Param: |
2754 |
|
|
@@@Name: notation |
2755 |
|
|
@@@Type: DOMString |
2756 |
|
|
@@@enDesc: |
2757 |
|
|
The notation name in the declaration. |
2758 |
|
|
@@@nullCase: |
2759 |
|
|
@@@@enDesc: |
2760 |
|
|
No notation name. |
2761 |
|
|
@@Return: |
2762 |
|
|
@@@Type: XDPEntityElement |
2763 |
|
|
@@@enDesc: |
2764 |
|
|
The newly created element node. |
2765 |
|
|
|
2766 |
|
|
{P:: A new <IF::Element> node with following attributes |
2767 |
|
|
<kwd:MUST> be returned: |
2768 |
|
|
|
2769 |
|
|
- <A::Node.localName>::: <XE::entity>. |
2770 |
|
|
|
2771 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2772 |
|
|
|
2773 |
|
|
- <A::Node.ownerDocument>::: The document. |
2774 |
|
|
|
2775 |
|
|
} |
2776 |
|
|
|
2777 |
|
|
{P:: A series of nodes <kwd:MUST> be associated to the returned |
2778 |
|
|
node as if the following algorithm were applied: |
2779 |
|
|
|
2780 |
|
|
{OLI:: If <P::isPE> is <DOM::true>, |
2781 |
|
|
|
2782 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the |
2783 |
|
|
document with a <CHAR::SPACE> as a parameter and append the |
2784 |
|
|
node to the returned element by the <M::Node.appendChild> |
2785 |
|
|
method. |
2786 |
|
|
|
2787 |
|
|
= Create a node by <M::XDPDocument.createXDPDelimiter> |
2788 |
|
|
on the document with a <CHAR::PERCENT SIGN> as a parameter |
2789 |
|
|
and append the node to the returned element by the |
2790 |
|
|
<M::Node.appendChild> method. |
2791 |
|
|
|
2792 |
|
|
} |
2793 |
|
|
|
2794 |
|
|
= If <P::name> is <DOM::null>, stop the algorithm. |
2795 |
|
|
|
2796 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2797 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2798 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2799 |
|
|
|
2800 |
|
|
= Create a node by <M::XDPDocument.createXDPName> on the document |
2801 |
|
|
with <P::name> as a parameter and append the |
2802 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2803 |
|
|
|
2804 |
|
|
{OLI:: If <P::systemId> is different from <DOM::null>, |
2805 |
|
|
|
2806 |
|
|
{OLI:: If <P::publicId> is different from <DOM::null>, |
2807 |
|
|
|
2808 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2809 |
|
|
with a <CHAR::SPACE> as a parameter and append the |
2810 |
|
|
node to the returned element by the <M::Node.appendChild> |
2811 |
|
|
method. |
2812 |
|
|
|
2813 |
|
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2814 |
|
|
on the document with a string <XML::PUBLIC> as |
2815 |
|
|
a parameter and append the |
2816 |
|
|
node to the returned element by the <M::Node.appendChild> |
2817 |
|
|
method. |
2818 |
|
|
|
2819 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2820 |
|
|
with a <CHAR::SPACE> as a parameter and append the |
2821 |
|
|
node to the returned element by the <M::Node.appendChild> |
2822 |
|
|
method. |
2823 |
|
|
|
2824 |
|
|
= Create a node by <M::XDPDocument.createXDPMinimumLiteral> |
2825 |
|
|
on the document with <P::publicId> as a parameter |
2826 |
|
|
and append the node to the returned element by |
2827 |
|
|
the <M::Node.appendChild> method. |
2828 |
|
|
|
2829 |
|
|
} |
2830 |
|
|
|
2831 |
|
|
{OLI:: Otherwise, |
2832 |
|
|
|
2833 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2834 |
|
|
with a <CHAR::SPACE> as a parameter and append the |
2835 |
|
|
node to the returned element by the <M::Node.appendChild> |
2836 |
|
|
method. |
2837 |
|
|
|
2838 |
|
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2839 |
|
|
on the document with a string <XML::SYSTEM> as |
2840 |
|
|
a parameter and append the |
2841 |
|
|
node to the returned element by the <M::Node.appendChild> |
2842 |
|
|
method. |
2843 |
|
|
|
2844 |
|
|
} |
2845 |
|
|
|
2846 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2847 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2848 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2849 |
|
|
|
2850 |
|
|
= Create a node by <M::XDPDocument.createXDPSystemLiteral> |
2851 |
|
|
on the document with <P::systemId> as a parameter |
2852 |
|
|
and append the node to the returned element by |
2853 |
|
|
the <M::Node.appendChild> method. |
2854 |
|
|
|
2855 |
|
|
{OLI:: If <P::notation> is different from <DOM::null> |
2856 |
|
|
and <P::isPE> is <DOM::false>, |
2857 |
|
|
|
2858 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2859 |
|
|
with a <CHAR::SPACE> as a parameter and append the |
2860 |
|
|
node to the returned element by the <M::Node.appendChild> |
2861 |
|
|
method. |
2862 |
|
|
|
2863 |
|
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2864 |
|
|
on the document with a string <XML::NDATA> as |
2865 |
|
|
a parameter and append the |
2866 |
|
|
node to the returned element by the <M::Node.appendChild> |
2867 |
|
|
method. |
2868 |
|
|
|
2869 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2870 |
|
|
with a <CHAR::SPACE> as a parameter and append the |
2871 |
|
|
node to the returned element by the <M::Node.appendChild> |
2872 |
|
|
method. |
2873 |
|
|
|
2874 |
|
|
= Create a node by <M::XDPDocument.createXDPName> |
2875 |
|
|
on the document with <P::notation> as a parameter |
2876 |
|
|
and append the node to the returned element by |
2877 |
|
|
the <M::Node.appendChild> method. |
2878 |
|
|
|
2879 |
|
|
} |
2880 |
|
|
|
2881 |
|
|
} |
2882 |
|
|
|
2883 |
|
|
{OLI:: Otherwise, |
2884 |
|
|
|
2885 |
|
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2886 |
|
|
a <CHAR::SPACE> as a parameter and append the |
2887 |
|
|
node to the returned element by the <M::Node.appendChild> method. |
2888 |
|
|
|
2889 |
|
|
= Create a node by <M::XDPDocument.createXDPEntityValue> |
2890 |
|
|
on the document with <P::value> as a parameter |
2891 |
|
|
and append the node to the returned element by |
2892 |
|
|
the <M::Node.appendChild> method. |
2893 |
|
|
|
2894 |
|
|
} |
2895 |
|
|
|
2896 |
|
|
} |
2897 |
|
|
@@@PerlDef: |
2898 |
|
|
__DEEP{ |
2899 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'entity'); |
2900 |
|
|
if ($isPE) { |
2901 |
|
|
$r-><M::Node.appendChild> |
2902 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2903 |
|
|
$r-><M::Node.appendChild> |
2904 |
|
|
($self-><M::XDPDocument.createXDPDelimiter> ('%')); |
2905 |
|
|
} |
2906 |
|
|
if (defined $name) { |
2907 |
|
|
$r-><M::Node.appendChild> |
2908 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2909 |
|
|
$r-><M::Node.appendChild> |
2910 |
|
|
($self-><M::XDPDocument.createXDPName> ($name)); |
2911 |
|
|
|
2912 |
|
|
if (defined $systemId) { |
2913 |
|
|
if (defined $publicId) { |
2914 |
|
|
$r-><M::Node.appendChild> |
2915 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2916 |
|
|
$r-><M::Node.appendChild> |
2917 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ('PUBLIC')); |
2918 |
|
|
$r-><M::Node.appendChild> |
2919 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2920 |
|
|
$r-><M::Node.appendChild> |
2921 |
|
|
($self-><M::XDPDocument.createXDPMinimumLiteral> |
2922 |
|
|
($publicId)); |
2923 |
|
|
$r-><M::Node.appendChild> |
2924 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2925 |
|
|
$r-><M::Node.appendChild> |
2926 |
|
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2927 |
|
|
($systemId)); |
2928 |
|
|
} else { |
2929 |
|
|
$r-><M::Node.appendChild> |
2930 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2931 |
|
|
$r-><M::Node.appendChild> |
2932 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ('SYSTEM')); |
2933 |
|
|
$r-><M::Node.appendChild> |
2934 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2935 |
|
|
$r-><M::Node.appendChild> |
2936 |
|
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2937 |
|
|
($systemId)); |
2938 |
|
|
} |
2939 |
|
|
|
2940 |
|
|
if (defined $notation and not $isPE) { |
2941 |
|
|
$r-><M::Node.appendChild> |
2942 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2943 |
|
|
$r-><M::Node.appendChild> |
2944 |
|
|
($self-><M::XDPDocument.createXDPKeyword> ('NDATA')); |
2945 |
|
|
$r-><M::Node.appendChild> |
2946 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2947 |
|
|
$r-><M::Node.appendChild> |
2948 |
|
|
($self-><M::XDPDocument.createXDPName> ($notation)); |
2949 |
|
|
} |
2950 |
|
|
} else { |
2951 |
|
|
$r-><M::Node.appendChild> |
2952 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2953 |
|
|
$r-><M::Node.appendChild> |
2954 |
|
|
($self-><M::XDPDocument.createXDPEntityValue> ($value)); |
2955 |
|
|
} |
2956 |
|
|
} |
2957 |
|
|
}__; |
2958 |
|
|
|
2959 |
|
|
@@Test: |
2960 |
|
|
@@@QName: XDPDocument.createXDPEntity.1.test |
2961 |
|
|
@@@PerlDef: |
2962 |
|
|
my $doc; |
2963 |
|
|
__CODE{createXDPDocumentForTest}__; |
2964 |
|
|
|
2965 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
2966 |
|
|
(true, 'iname', 'evalue', 'pubid', 'sysid', 'nname'); |
2967 |
|
|
|
2968 |
|
|
$test->id ('interface'); |
2969 |
|
|
$test->assert_isa ($el, <IFName::XDPEntityElement>); |
2970 |
|
|
|
2971 |
|
|
$test->id ('namespaceURI'); |
2972 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2973 |
|
|
|
2974 |
|
|
$test->id ('localName'); |
2975 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'entity'); |
2976 |
|
|
|
2977 |
|
|
$test->id ('dtdText'); |
2978 |
|
|
$test->assert_equals |
2979 |
|
|
($el-><AG::XDPElement.dtdText>, |
2980 |
|
|
'<!ENTITY % iname PUBLIC "pubid" "sysid">'); |
2981 |
|
|
@@Test: |
2982 |
|
|
@@@QName: XDPDocument.createXDPEntity.2.test |
2983 |
|
|
@@@PerlDef: |
2984 |
|
|
my $doc; |
2985 |
|
|
__CODE{createXDPDocumentForTest}__; |
2986 |
|
|
|
2987 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
2988 |
|
|
(false, 'iname', 'evalue', 'pubid', 'sysid', 'nname'); |
2989 |
|
|
|
2990 |
|
|
$test->id ('dtdText'); |
2991 |
|
|
$test->assert_equals |
2992 |
|
|
($el-><AG::XDPElement.dtdText>, |
2993 |
|
|
'<!ENTITY iname PUBLIC "pubid" "sysid" NDATA nname>'); |
2994 |
|
|
@@Test: |
2995 |
|
|
@@@QName: XDPDocument.createXDPEntity.3.test |
2996 |
|
|
@@@PerlDef: |
2997 |
|
|
my $doc; |
2998 |
|
|
__CODE{createXDPDocumentForTest}__; |
2999 |
|
|
|
3000 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3001 |
|
|
(false, 'iname', 'evalue', 'pubid', 'sysid'); |
3002 |
|
|
|
3003 |
|
|
$test->id ('dtdText'); |
3004 |
|
|
$test->assert_equals |
3005 |
|
|
($el-><AG::XDPElement.dtdText>, |
3006 |
|
|
'<!ENTITY iname PUBLIC "pubid" "sysid">'); |
3007 |
|
|
@@Test: |
3008 |
|
|
@@@QName: XDPDocument.createXDPEntity.4.test |
3009 |
|
|
@@@PerlDef: |
3010 |
|
|
my $doc; |
3011 |
|
|
__CODE{createXDPDocumentForTest}__; |
3012 |
|
|
|
3013 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3014 |
|
|
(true, 'iname', 'evalue', 'pubid', 'sysid'); |
3015 |
|
|
|
3016 |
|
|
$test->id ('dtdText'); |
3017 |
|
|
$test->assert_equals |
3018 |
|
|
($el-><AG::XDPElement.dtdText>, |
3019 |
|
|
'<!ENTITY % iname PUBLIC "pubid" "sysid">'); |
3020 |
|
|
@@Test: |
3021 |
|
|
@@@QName: XDPDocument.createXDPEntity.5.test |
3022 |
|
|
@@@PerlDef: |
3023 |
|
|
my $doc; |
3024 |
|
|
__CODE{createXDPDocumentForTest}__; |
3025 |
|
|
|
3026 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3027 |
|
|
(false, 'iname', 'evalue', null, 'sysid'); |
3028 |
|
|
|
3029 |
|
|
$test->id ('dtdText'); |
3030 |
|
|
$test->assert_equals |
3031 |
|
|
($el-><AG::XDPElement.dtdText>, |
3032 |
|
|
'<!ENTITY iname SYSTEM "sysid">'); |
3033 |
|
|
@@Test: |
3034 |
|
|
@@@QName: XDPDocument.createXDPEntity.6.test |
3035 |
|
|
@@@PerlDef: |
3036 |
|
|
my $doc; |
3037 |
|
|
__CODE{createXDPDocumentForTest}__; |
3038 |
|
|
|
3039 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3040 |
|
|
(true, 'iname', 'evalue', null, 'sysid'); |
3041 |
|
|
|
3042 |
|
|
$test->id ('dtdText'); |
3043 |
|
|
$test->assert_equals |
3044 |
|
|
($el-><AG::XDPElement.dtdText>, |
3045 |
|
|
'<!ENTITY % iname SYSTEM "sysid">'); |
3046 |
|
|
@@Test: |
3047 |
|
|
@@@QName: XDPDocument.createXDPEntity.7.test |
3048 |
|
|
@@@PerlDef: |
3049 |
|
|
my $doc; |
3050 |
|
|
__CODE{createXDPDocumentForTest}__; |
3051 |
|
|
|
3052 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3053 |
|
|
(false, 'iname', 'evalue'); |
3054 |
|
|
|
3055 |
|
|
$test->id ('dtdText'); |
3056 |
|
|
$test->assert_equals |
3057 |
|
|
($el-><AG::XDPElement.dtdText>, |
3058 |
|
|
'<!ENTITY iname "evalue">'); |
3059 |
|
|
@@Test: |
3060 |
|
|
@@@QName: XDPDocument.createXDPEntity.8.test |
3061 |
|
|
@@@PerlDef: |
3062 |
|
|
my $doc; |
3063 |
|
|
__CODE{createXDPDocumentForTest}__; |
3064 |
|
|
|
3065 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3066 |
|
|
(true, 'iname', 'evalue'); |
3067 |
|
|
|
3068 |
|
|
$test->id ('dtdText'); |
3069 |
|
|
$test->assert_equals |
3070 |
|
|
($el-><AG::XDPElement.dtdText>, |
3071 |
|
|
'<!ENTITY % iname "evalue">'); |
3072 |
|
|
@@Test: |
3073 |
|
|
@@@QName: XDPDocument.createXDPEntity.9.test |
3074 |
|
|
@@@PerlDef: |
3075 |
|
|
my $doc; |
3076 |
|
|
__CODE{createXDPDocumentForTest}__; |
3077 |
|
|
|
3078 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3079 |
|
|
(false, 'iname'); |
3080 |
|
|
|
3081 |
|
|
$test->id ('dtdText'); |
3082 |
|
|
$test->assert_equals |
3083 |
|
|
($el-><AG::XDPElement.dtdText>, |
3084 |
|
|
'<!ENTITY iname "">'); |
3085 |
|
|
@@Test: |
3086 |
|
|
@@@QName: XDPDocument.createXDPEntity.10.test |
3087 |
|
|
@@@PerlDef: |
3088 |
|
|
my $doc; |
3089 |
|
|
__CODE{createXDPDocumentForTest}__; |
3090 |
|
|
|
3091 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3092 |
|
|
(false); |
3093 |
|
|
|
3094 |
|
|
$test->id ('dtdText'); |
3095 |
|
|
$test->assert_equals |
3096 |
|
|
($el-><AG::XDPElement.dtdText>, |
3097 |
|
|
'<!ENTITY>'); |
3098 |
|
|
@@Test: |
3099 |
|
|
@@@QName: XDPDocument.createXDPEntity.11.test |
3100 |
|
|
@@@PerlDef: |
3101 |
|
|
my $doc; |
3102 |
|
|
__CODE{createXDPDocumentForTest}__; |
3103 |
|
|
|
3104 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3105 |
|
|
(true); |
3106 |
|
|
|
3107 |
|
|
$test->id ('dtdText'); |
3108 |
|
|
$test->assert_equals |
3109 |
|
|
($el-><AG::XDPElement.dtdText>, |
3110 |
|
|
'<!ENTITY %>'); |
3111 |
|
|
|
3112 |
|
|
@Method: |
3113 |
|
|
@@Name: createXDPEnumGroup |
3114 |
|
|
@@enDesc: |
3115 |
|
|
Creates a <XE::xdp|enum-group> element. |
3116 |
|
|
@@Return: |
3117 |
|
|
@@@Type: XDPEnumGroupElement |
3118 |
|
|
@@@enDesc: |
3119 |
|
|
The newly created element node. |
3120 |
|
|
|
3121 |
|
|
{P:: A new <IF::Element> node with following attributes |
3122 |
|
|
<kwd:MUST> be returned: |
3123 |
|
|
|
3124 |
|
|
- <A::Node.localName>::: <XE::enum-group>. |
3125 |
|
|
|
3126 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3127 |
|
|
|
3128 |
|
|
- <A::Node.ownerDocument>::: The document. |
3129 |
|
|
|
3130 |
|
|
} |
3131 |
|
|
@@@PerlDef: |
3132 |
|
|
__DEEP{ |
3133 |
|
|
$r = $self-><M::Document.createElementNS> |
3134 |
|
|
(<Q::xdp|>, 'enum-group'); |
3135 |
|
|
}__; |
3136 |
|
|
|
3137 |
|
|
@@Test: |
3138 |
|
|
@@@QName: XDPDocument.createXDPEnumGroup.1.test |
3139 |
|
|
@@@PerlDef: |
3140 |
|
|
my $doc; |
3141 |
|
|
__CODE{createXDPDocumentForTest}__; |
3142 |
|
|
|
3143 |
|
|
my $el = $doc-><M::XDPDocument.createXDPEnumGroup>; |
3144 |
|
|
|
3145 |
|
|
$test->id ('interface'); |
3146 |
|
|
$test->assert_isa ($el, <IFName::XDPEnumGroupElement>); |
3147 |
|
|
|
3148 |
|
|
$test->id ('namespaceURI'); |
3149 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3150 |
|
|
|
3151 |
|
|
$test->id ('localName'); |
3152 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'enum-group'); |
3153 |
|
|
|
3154 |
|
|
$test->id ('dtdText'); |
3155 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3156 |
|
|
|
3157 |
|
|
@Method: |
3158 |
|
|
@@Name: createXDPModelGroup |
3159 |
|
|
@@enDesc: |
3160 |
|
|
Creates a <XE::xdp|model-group> element. |
3161 |
|
|
@@Return: |
3162 |
|
|
@@@Type: XDPModelGroupElement |
3163 |
|
|
@@@enDesc: |
3164 |
|
|
The newly created element node. |
3165 |
|
|
|
3166 |
|
|
{P:: A new <IF::Element> node with following attributes |
3167 |
|
|
<kwd:MUST> be returned: |
3168 |
|
|
|
3169 |
|
|
- <A::Node.localName>::: <XE::model-group>. |
3170 |
|
|
|
3171 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3172 |
|
|
|
3173 |
|
|
- <A::Node.ownerDocument>::: The document. |
3174 |
|
|
|
3175 |
|
|
} |
3176 |
|
|
@@@PerlDef: |
3177 |
|
|
__DEEP{ |
3178 |
|
|
$r = $self-><M::Document.createElementNS> |
3179 |
|
|
(<Q::xdp|>, 'model-group'); |
3180 |
|
|
}__; |
3181 |
|
|
|
3182 |
|
|
@@Test: |
3183 |
|
|
@@@QName: XDPDocument.createXDPModelGroup.1.test |
3184 |
|
|
@@@PerlDef: |
3185 |
|
|
my $doc; |
3186 |
|
|
__CODE{createXDPDocumentForTest}__; |
3187 |
|
|
|
3188 |
|
|
my $el = $doc-><M::XDPDocument.createXDPModelGroup>; |
3189 |
|
|
|
3190 |
|
|
$test->id ('interface'); |
3191 |
|
|
$test->assert_isa ($el, <IFName::XDPModelGroupElement>); |
3192 |
|
|
|
3193 |
|
|
$test->id ('namespaceURI'); |
3194 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3195 |
|
|
|
3196 |
|
|
$test->id ('localName'); |
3197 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'model-group'); |
3198 |
|
|
|
3199 |
|
|
$test->id ('dtdText'); |
3200 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3201 |
wakaba |
1.3 |
|
3202 |
|
|
@Method: |
3203 |
|
|
@@Name: createXDPAttrDefinition |
3204 |
|
|
@@enDesc: |
3205 |
|
|
Creates a <XE::xdp|attr-definition> element. |
3206 |
|
|
|
3207 |
|
|
{ISSUE:: |
3208 |
|
|
Declared type and default type parameters should be added? |
3209 |
|
|
} |
3210 |
|
|
@@Param: |
3211 |
|
|
@@@Name: name |
3212 |
|
|
@@@Type: DOMString |
3213 |
|
|
@@@enDesc: |
3214 |
|
|
The name of the attribute. |
3215 |
|
|
@@@nullCase: |
3216 |
|
|
@@@@enDesc: |
3217 |
|
|
All parameters are ignored. |
3218 |
|
|
@@Return: |
3219 |
|
|
@@@Type: XDPElement |
3220 |
|
|
@@@enDesc: |
3221 |
|
|
The newly created element node. |
3222 |
|
|
|
3223 |
|
|
{P:: A new <IF::Element> node with following attributes |
3224 |
|
|
<kwd:MUST> be returned: |
3225 |
|
|
|
3226 |
|
|
- <A::Node.localName>::: <XE::attr-definition>. |
3227 |
|
|
|
3228 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3229 |
|
|
|
3230 |
|
|
- <A::Node.ownerDocument>::: The document. |
3231 |
|
|
|
3232 |
|
|
} |
3233 |
|
|
|
3234 |
|
|
{P:: If <P::name> is different from <DOM::null>, a |
3235 |
|
|
<IF::Element> node with following attributes |
3236 |
|
|
<kwd:MUST> be appended to the returned node |
3237 |
|
|
as if the <M::Node.appendChild> method were invoked. |
3238 |
|
|
|
3239 |
|
|
- <A::Node.localName>::: <XE::name>. |
3240 |
|
|
|
3241 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3242 |
|
|
|
3243 |
|
|
- <A::Node.ownerDocument>::: The document. |
3244 |
|
|
|
3245 |
|
|
- <A::Node.textContent>::: <P::name>. |
3246 |
|
|
|
3247 |
|
|
} |
3248 |
|
|
@@@PerlDef: |
3249 |
|
|
__DEEP{ |
3250 |
|
|
$r = $self-><M::Document.createElementNS> |
3251 |
|
|
(<Q::xdp|>, 'attr-definition'); |
3252 |
|
|
$r-><M::Node.appendChild> |
3253 |
|
|
($self-><M::XDPDocument.createXDPName> ($name)) |
3254 |
|
|
if defined $name; |
3255 |
|
|
}__; |
3256 |
|
|
|
3257 |
|
|
@@Test: |
3258 |
|
|
@@@QName: XDPDocument.createXDPAttrDefinition.1.test |
3259 |
|
|
@@@PerlDef: |
3260 |
|
|
my $doc; |
3261 |
|
|
__CODE{createXDPDocumentForTest}__; |
3262 |
|
|
|
3263 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition> ('aname'); |
3264 |
|
|
|
3265 |
|
|
$test->id ('interface'); |
3266 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3267 |
|
|
|
3268 |
|
|
$test->id ('namespaceURI'); |
3269 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3270 |
|
|
|
3271 |
|
|
$test->id ('localName'); |
3272 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3273 |
|
|
|
3274 |
|
|
$test->id ('dtdText'); |
3275 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'aname'); |
3276 |
|
|
@@Test: |
3277 |
|
|
@@@QName: XDPDocument.createXDPAttrDefinition.2.test |
3278 |
|
|
@@@PerlDef: |
3279 |
|
|
my $doc; |
3280 |
|
|
__CODE{createXDPDocumentForTest}__; |
3281 |
|
|
|
3282 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition>; |
3283 |
|
|
|
3284 |
|
|
$test->id ('interface'); |
3285 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3286 |
|
|
|
3287 |
|
|
$test->id ('namespaceURI'); |
3288 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3289 |
|
|
|
3290 |
|
|
$test->id ('localName'); |
3291 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3292 |
|
|
|
3293 |
|
|
$test->id ('dtdText'); |
3294 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
3295 |
|
|
|
3296 |
|
|
@Method: |
3297 |
|
|
@@Name: createXDPAttlist |
3298 |
|
|
@@enDesc: |
3299 |
|
|
Creates a <XE::xdp|attlist> element. |
3300 |
|
|
@@Param: |
3301 |
|
|
@@@Name: name |
3302 |
|
|
@@@Type: DOMString |
3303 |
|
|
@@@enDesc: |
3304 |
|
|
The name in the declaration. |
3305 |
|
|
@@@nullCase: |
3306 |
|
|
@@@@enDesc: |
3307 |
|
|
The declaration does not contain any name. |
3308 |
|
|
@@Return: |
3309 |
|
|
@@@Type: XDPAttlistElement |
3310 |
|
|
@@@enDesc: |
3311 |
|
|
The newly created element node. |
3312 |
|
|
|
3313 |
|
|
{P:: A new <IF::Element> node with following attributes |
3314 |
|
|
<kwd:MUST> be returned: |
3315 |
|
|
|
3316 |
|
|
- <A::Node.localName>::: <XE::attlist>. |
3317 |
|
|
|
3318 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3319 |
|
|
|
3320 |
|
|
- <A::Node.ownerDocument>::: The document. |
3321 |
|
|
|
3322 |
|
|
} |
3323 |
|
|
|
3324 |
|
|
{P:: If <P::name> is different from <DOM::null>, two |
3325 |
|
|
<IF::Element> nodes with following attributes |
3326 |
|
|
<kwd:MUST> be appended to the returned node |
3327 |
|
|
as if the <M::Node.appendChild> method were invoked in order. |
3328 |
|
|
|
3329 |
|
|
{LI:: |
3330 |
|
|
|
3331 |
|
|
- <A::Node.localName>::: <XE::s>. |
3332 |
|
|
|
3333 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3334 |
|
|
|
3335 |
|
|
- <A::Node.ownerDocument>::: The document. |
3336 |
|
|
|
3337 |
|
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3338 |
|
|
|
3339 |
|
|
} |
3340 |
|
|
|
3341 |
|
|
{LI:: |
3342 |
|
|
|
3343 |
|
|
- <A::Node.localName>::: <XE::name>. |
3344 |
|
|
|
3345 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3346 |
|
|
|
3347 |
|
|
- <A::Node.ownerDocument>::: The document. |
3348 |
|
|
|
3349 |
|
|
- <A::Node.textContent>::: <P::name>. |
3350 |
|
|
|
3351 |
|
|
} |
3352 |
|
|
|
3353 |
|
|
} |
3354 |
|
|
@@@PerlDef: |
3355 |
|
|
__DEEP{ |
3356 |
|
|
$r = $self-><M::Document.createElementNS> |
3357 |
|
|
(<Q::xdp|>, 'attlist'); |
3358 |
|
|
if (defined $name) { |
3359 |
|
|
$r-><M::Node.appendChild> |
3360 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3361 |
|
|
$r-><M::Node.appendChild> |
3362 |
|
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3363 |
|
|
} |
3364 |
|
|
}__; |
3365 |
|
|
|
3366 |
|
|
@@Test: |
3367 |
|
|
@@@QName: XDPDocument.createXDPAttlist.1.test |
3368 |
|
|
@@@PerlDef: |
3369 |
|
|
my $doc; |
3370 |
|
|
__CODE{createXDPDocumentForTest}__; |
3371 |
|
|
|
3372 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttlist> ('aname'); |
3373 |
|
|
|
3374 |
|
|
$test->id ('interface'); |
3375 |
|
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3376 |
|
|
|
3377 |
|
|
$test->id ('namespaceURI'); |
3378 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3379 |
|
|
|
3380 |
|
|
$test->id ('localName'); |
3381 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3382 |
|
|
|
3383 |
|
|
$test->id ('dtdText'); |
3384 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST aname>'); |
3385 |
|
|
@@Test: |
3386 |
|
|
@@@QName: XDPDocument.createXDPAttlist.2.test |
3387 |
|
|
@@@PerlDef: |
3388 |
|
|
my $doc; |
3389 |
|
|
__CODE{createXDPDocumentForTest}__; |
3390 |
|
|
|
3391 |
|
|
my $el = $doc-><M::XDPDocument.createXDPAttlist>; |
3392 |
|
|
|
3393 |
|
|
$test->id ('interface'); |
3394 |
|
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3395 |
|
|
|
3396 |
|
|
$test->id ('namespaceURI'); |
3397 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3398 |
|
|
|
3399 |
|
|
$test->id ('localName'); |
3400 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3401 |
|
|
|
3402 |
|
|
$test->id ('dtdText'); |
3403 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST>'); |
3404 |
|
|
|
3405 |
|
|
@Method: |
3406 |
|
|
@@Name: createXDPElement |
3407 |
|
|
@@enDesc: |
3408 |
|
|
Creates a <XE::xdp|element> element. |
3409 |
|
|
|
3410 |
|
|
{ISSUE:: |
3411 |
|
|
Should declared content parameter be added? |
3412 |
|
|
} |
3413 |
|
|
@@Param: |
3414 |
|
|
@@@Name: name |
3415 |
|
|
@@@Type: DOMString |
3416 |
|
|
@@@enDesc: |
3417 |
|
|
The name in the declaration. |
3418 |
|
|
@@@nullCase: |
3419 |
|
|
@@@@enDesc: |
3420 |
|
|
The declaration does not contain any name. |
3421 |
|
|
@@Return: |
3422 |
|
|
@@@Type: XDPElementElement |
3423 |
|
|
@@@enDesc: |
3424 |
|
|
The newly created element node. |
3425 |
|
|
|
3426 |
|
|
{P:: A new <IF::Element> node with following attributes |
3427 |
|
|
<kwd:MUST> be returned: |
3428 |
|
|
|
3429 |
|
|
- <A::Node.localName>::: <XE::element>. |
3430 |
|
|
|
3431 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3432 |
|
|
|
3433 |
|
|
- <A::Node.ownerDocument>::: The document. |
3434 |
|
|
|
3435 |
|
|
} |
3436 |
|
|
|
3437 |
|
|
{P:: If <P::name> is different from <DOM::null>, two |
3438 |
|
|
<IF::Element> nodes with following attributes |
3439 |
|
|
<kwd:MUST> be appended to the returned node |
3440 |
|
|
as if the <M::Node.appendChild> method were invoked in order. |
3441 |
|
|
|
3442 |
|
|
{LI:: |
3443 |
|
|
|
3444 |
|
|
- <A::Node.localName>::: <XE::s>. |
3445 |
|
|
|
3446 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3447 |
|
|
|
3448 |
|
|
- <A::Node.ownerDocument>::: The document. |
3449 |
|
|
|
3450 |
|
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3451 |
|
|
|
3452 |
|
|
} |
3453 |
|
|
|
3454 |
|
|
{LI:: |
3455 |
|
|
|
3456 |
|
|
- <A::Node.localName>::: <XE::name>. |
3457 |
|
|
|
3458 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3459 |
|
|
|
3460 |
|
|
- <A::Node.ownerDocument>::: The document. |
3461 |
|
|
|
3462 |
|
|
- <A::Node.textContent>::: <P::name>. |
3463 |
|
|
|
3464 |
|
|
} |
3465 |
|
|
|
3466 |
|
|
} |
3467 |
|
|
@@@PerlDef: |
3468 |
|
|
__DEEP{ |
3469 |
|
|
$r = $self-><M::Document.createElementNS> |
3470 |
|
|
(<Q::xdp|>, 'element'); |
3471 |
|
|
if (defined $name) { |
3472 |
|
|
$r-><M::Node.appendChild> |
3473 |
|
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3474 |
|
|
$r-><M::Node.appendChild> |
3475 |
|
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3476 |
|
|
} |
3477 |
|
|
}__; |
3478 |
|
|
|
3479 |
|
|
@@Test: |
3480 |
|
|
@@@QName: XDPDocument.createXDPElement.1.test |
3481 |
|
|
@@@PerlDef: |
3482 |
|
|
my $doc; |
3483 |
|
|
__CODE{createXDPDocumentForTest}__; |
3484 |
|
|
|
3485 |
|
|
my $el = $doc-><M::XDPDocument.createXDPElement> ('aname'); |
3486 |
|
|
|
3487 |
|
|
$test->id ('interface'); |
3488 |
|
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3489 |
|
|
|
3490 |
|
|
$test->id ('namespaceURI'); |
3491 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3492 |
|
|
|
3493 |
|
|
$test->id ('localName'); |
3494 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3495 |
|
|
|
3496 |
|
|
$test->id ('dtdText'); |
3497 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT aname>'); |
3498 |
|
|
@@Test: |
3499 |
|
|
@@@QName: XDPDocument.createXDPElement.2.test |
3500 |
|
|
@@@PerlDef: |
3501 |
|
|
my $doc; |
3502 |
|
|
__CODE{createXDPDocumentForTest}__; |
3503 |
|
|
|
3504 |
|
|
my $el = $doc-><M::XDPDocument.createXDPElement>; |
3505 |
|
|
|
3506 |
|
|
$test->id ('interface'); |
3507 |
|
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3508 |
|
|
|
3509 |
|
|
$test->id ('namespaceURI'); |
3510 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3511 |
|
|
|
3512 |
|
|
$test->id ('localName'); |
3513 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3514 |
|
|
|
3515 |
|
|
$test->id ('dtdText'); |
3516 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT>'); |
3517 |
wakaba |
1.4 |
|
3518 |
|
|
@Method: |
3519 |
|
|
@@Name: createXDPIf |
3520 |
|
|
@@enDesc: |
3521 |
|
|
Creates an <XE::xdp|if> element. |
3522 |
|
|
@@Param: |
3523 |
|
|
@@@Name: statusEntity |
3524 |
|
|
@@@Type: DOMString |
3525 |
|
|
@@@enDesc: |
3526 |
|
|
The name of the parameter entity that contains |
3527 |
|
|
the status of the marked section. |
3528 |
|
|
@@@nullCase: |
3529 |
|
|
@@@@enDesc: |
3530 |
|
|
Same as an empty string. |
3531 |
|
|
@@Return: |
3532 |
|
|
@@@Type: XDPIfElement |
3533 |
|
|
@@@enDesc: |
3534 |
|
|
The newly created element node. |
3535 |
|
|
|
3536 |
|
|
{P:: A new <IF::Element> node with following attributes |
3537 |
|
|
<kwd:MUST> be returned: |
3538 |
|
|
|
3539 |
|
|
- <A::Node.localName>::: <XE::if>. |
3540 |
|
|
|
3541 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3542 |
|
|
|
3543 |
|
|
- <A::Node.ownerDocument>::: The document. |
3544 |
|
|
|
3545 |
|
|
} |
3546 |
|
|
|
3547 |
|
|
{P:: The <A::Node.attributes> <IF::tc|NamedNodeMap> |
3548 |
|
|
of the returned <IF:Element> node <kwd:MUST> contain |
3549 |
|
|
a new <IF::te|Attr> node with following attributes: |
3550 |
|
|
|
3551 |
|
|
- <A::Node.localName>::: <XA::status-entity>. |
3552 |
|
|
|
3553 |
|
|
- <A::Node.namespaceURI>::: <DOM::null>. |
3554 |
|
|
|
3555 |
|
|
- <A::te|Attr.specified>::: <DOM::true>. |
3556 |
|
|
|
3557 |
|
|
- <A::Node.textContent>::: <P::statusEntity>, or an empty |
3558 |
|
|
string if <P::statusEntity> |
3559 |
|
|
is <DOM::null>. |
3560 |
|
|
|
3561 |
|
|
} |
3562 |
|
|
|
3563 |
|
|
{P:: <A::Node.childNodes> <IF::tc|NodeList> of |
3564 |
|
|
the returned <IF::Element> node <kwd:MUST> contain |
3565 |
|
|
two <IF::Element> nodes in order: |
3566 |
|
|
|
3567 |
|
|
{LI:: |
3568 |
|
|
|
3569 |
|
|
- <A::Node.localName>::: <XE::true>. |
3570 |
|
|
|
3571 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3572 |
|
|
|
3573 |
|
|
- <A::Node.ownerDocument>::: The document. |
3574 |
|
|
|
3575 |
|
|
- <A::Node.textContent>::: An empty string. |
3576 |
|
|
|
3577 |
|
|
} |
3578 |
|
|
|
3579 |
|
|
{LI:: |
3580 |
|
|
|
3581 |
|
|
- <A::Node.localName>::: <XE::false>. |
3582 |
|
|
|
3583 |
|
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3584 |
|
|
|
3585 |
|
|
- <A::Node.ownerDocument>::: The document. |
3586 |
|
|
|
3587 |
|
|
- <A::Node.textContent>::: An empty string. |
3588 |
|
|
|
3589 |
|
|
} |
3590 |
|
|
|
3591 |
|
|
} |
3592 |
|
|
@@@PerlDef: |
3593 |
|
|
__DEEP{ |
3594 |
|
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'if'); |
3595 |
|
|
$r-><M::Element.setAttributeNS> |
3596 |
|
|
(null, 'status-entity', |
3597 |
|
|
defined $statusEntity ? $statusEntity : ''); |
3598 |
|
|
$r-><M::Node.appendChild> |
3599 |
|
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'tr'.'ue')); |
3600 |
|
|
$r-><M::Node.appendChild> |
3601 |
|
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'fal'.'se')); |
3602 |
|
|
}__; |
3603 |
|
|
|
3604 |
|
|
@@Test: |
3605 |
|
|
@@@QName: XDPDocument.createXDPIf.1.test |
3606 |
|
|
@@@PerlDef: |
3607 |
|
|
my $doc; |
3608 |
|
|
__CODE{createXDPDocumentForTest}__; |
3609 |
|
|
|
3610 |
|
|
my $el = $doc-><M::XDPDocument.createXDPIf> ('aname'); |
3611 |
|
|
|
3612 |
|
|
$test->id ('interface'); |
3613 |
|
|
$test->assert_isa ($el, <IFName::XDPIfElement>); |
3614 |
|
|
|
3615 |
|
|
$test->id ('namespaceURI'); |
3616 |
|
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3617 |
|
|
|
3618 |
|
|
$test->id ('localName'); |
3619 |
|
|
$test->assert_equals ($el-><AG::Node.localName>, 'if'); |
3620 |
|
|
|
3621 |
|
|
$test->id ('dtdText'); |
3622 |
|
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
3623 |
wakaba |
1.7 |
"<![%aname;[\n<!-- end of aname -->]]>"); |
3624 |
wakaba |
1.4 |
|
3625 |
|
|
$test->id ('fc'); |
3626 |
|
|
my $fc = $el-><AG::Node.firstChild>; |
3627 |
|
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3628 |
|
|
|
3629 |
|
|
$test->id ('fc.namespaceURI'); |
3630 |
|
|
$test->assert_equals ($fc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3631 |
|
|
|
3632 |
|
|
$test->id ('fc.localName'); |
3633 |
|
|
$test->assert_equals ($fc-><AG::Node.localName>, 'tr'.'ue'); |
3634 |
|
|
|
3635 |
|
|
$test->id ('lc'); |
3636 |
|
|
my $lc = $el-><AG::Node.lastChild>; |
3637 |
|
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3638 |
|
|
|
3639 |
|
|
$test->id ('lc.namespaceURI'); |
3640 |
|
|
$test->assert_equals ($lc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3641 |
|
|
|
3642 |
|
|
$test->id ('lc.localName'); |
3643 |
|
|
$test->assert_equals ($lc-><AG::Node.localName>, 'fal'.'se'); |
3644 |
wakaba |
1.1 |
##XDPDocument |
3645 |
|
|
|
3646 |
|
|
IFClsDef: |
3647 |
|
|
@IFQName: XDPElement |
3648 |
|
|
@ClsQName: ManakaiDOMXDPElement |
3649 |
|
|
|
3650 |
|
|
@IFISA: Element |
3651 |
|
|
@ClsISA: te|ManakaiDOMElement |
3652 |
|
|
|
3653 |
wakaba |
1.12 |
@s:elementType: AnyXDPElement |
3654 |
wakaba |
1.1 |
|
3655 |
|
|
@Test: |
3656 |
|
|
@@QName: createElementNS.XDPElement.test |
3657 |
|
|
@@PerlDef: |
3658 |
|
|
my $doc; |
3659 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3660 |
|
|
|
3661 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::xdp:>, 'anElement'); |
3662 |
|
|
|
3663 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3664 |
|
|
|
3665 |
|
|
@Attr: |
3666 |
|
|
@@Name: dtdText |
3667 |
|
|
@@enDesc: |
3668 |
|
|
The serialized representation of the element and its descendants. |
3669 |
|
|
@@Type: DOMString |
3670 |
|
|
@@Get: |
3671 |
|
|
@@@enDesc: |
3672 |
|
|
{ISSUE:: |
3673 |
|
|
Definition |
3674 |
|
|
} |
3675 |
|
|
@@@PerlDef: |
3676 |
|
|
require Message::DOM::Traversal; |
3677 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
3678 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
3679 |
|
|
my $tw = $doctrv->create_tree_walker |
3680 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
3681 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
3682 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
3683 |
|
|
sub { |
3684 |
|
|
my $node = $_[1]; |
3685 |
|
|
if ($node-><AG::Node.nodeType> |
3686 |
|
|
== <C::Node.ELEMENT_NODE>) { |
3687 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
3688 |
|
|
if (not defined $ns) { |
3689 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3690 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
3691 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3692 |
|
|
} else { |
3693 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3694 |
|
|
} |
3695 |
|
|
} else { |
3696 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3697 |
|
|
} |
3698 |
|
|
}, true); |
3699 |
|
|
my $current = $tw->first_child; |
3700 |
|
|
$r = ''; |
3701 |
|
|
C: while (defined $current) { |
3702 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
3703 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
3704 |
|
|
} else { |
3705 |
|
|
$r .= $current-><AG::Node.textContent>; |
3706 |
|
|
} |
3707 |
|
|
|
3708 |
|
|
$current = $tw->next_sibling; |
3709 |
|
|
} # C |
3710 |
|
|
##XDPElement |
3711 |
|
|
|
3712 |
|
|
ResourceDef: |
3713 |
|
|
@QName: AnyXDPElement |
3714 |
|
|
@DISCore:resourceType: s|AnyElementInNS |
3715 |
|
|
@AppName: |
3716 |
|
|
@@@: xdp|* |
3717 |
|
|
@@ContentType: DISCore|QName |
3718 |
|
|
@ForCheck: =ManakaiDOM|all |
3719 |
|
|
|
3720 |
|
|
IFClsETDef: |
3721 |
|
|
@IFQName: XDPPEElement |
3722 |
|
|
@ETQName: xdp|pe |
3723 |
|
|
@ClsQName: ManakaiDOMXDPPEElement |
3724 |
|
|
|
3725 |
|
|
@IFISA: XDPElement |
3726 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3727 |
|
|
|
3728 |
|
|
@enDesc: |
3729 |
|
|
An <XE::xdp|pe> element represents an XML parameter |
3730 |
|
|
entity, an XML external subset entity, or an XML internal subset. |
3731 |
|
|
##XDPPEElement |
3732 |
|
|
|
3733 |
|
|
IFClsETDef: |
3734 |
|
|
@IFQName: XDPElementElement |
3735 |
|
|
@ETQName: xdp|element |
3736 |
|
|
@ClsQName: ManakaiDOMXDPElementElement |
3737 |
|
|
|
3738 |
|
|
@IFISA: XDPElement |
3739 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3740 |
|
|
|
3741 |
|
|
@enDesc: |
3742 |
|
|
An <XE::xdp|element> element represents an XML <XML::ELEMENT> |
3743 |
|
|
declaration. |
3744 |
|
|
|
3745 |
|
|
@CAttr: |
3746 |
|
|
@@Name: dtdText |
3747 |
|
|
@@Type: DOMString |
3748 |
|
|
@@Get: |
3749 |
|
|
@@@PerlDef: |
3750 |
|
|
$r = '<!ELEMENT'.$self->SUPER::dtd_text.'>'; |
3751 |
|
|
##XDPElementElement |
3752 |
|
|
|
3753 |
|
|
IFClsETDef: |
3754 |
|
|
@IFQName: XDPModelGroupElement |
3755 |
|
|
@ETQName: xdp|model-group |
3756 |
|
|
@ClsQName: ManakaiDOMXDPModelGroupElement |
3757 |
|
|
|
3758 |
|
|
@IFISA: XDPElement |
3759 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3760 |
|
|
|
3761 |
|
|
@enDesc: |
3762 |
|
|
An <XE::xdp|model-group> element represents an XML model |
3763 |
|
|
group. |
3764 |
|
|
|
3765 |
|
|
@CAttr: |
3766 |
|
|
@@Name: dtdText |
3767 |
|
|
@@Type: DOMString |
3768 |
|
|
@@Get: |
3769 |
|
|
@@@PerlDef: |
3770 |
|
|
$r = '('.$self->SUPER::dtd_text.')'; |
3771 |
|
|
##XDPModelGroupElement |
3772 |
|
|
|
3773 |
|
|
IFClsETDef: |
3774 |
|
|
@IFQName: XDPAttlistElement |
3775 |
|
|
@ETQName: xdp|attlist |
3776 |
|
|
@ClsQName: ManakaiDOMXDPAttlistElement |
3777 |
|
|
|
3778 |
|
|
@IFISA: XDPElement |
3779 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3780 |
|
|
|
3781 |
|
|
@enDesc: |
3782 |
|
|
An <XE::xdp|attlist> element represents an XML <XML::ATTLIST> |
3783 |
|
|
declaration. |
3784 |
|
|
|
3785 |
|
|
@CAttr: |
3786 |
|
|
@@Name: dtdText |
3787 |
|
|
@@Type: DOMString |
3788 |
|
|
@@Get: |
3789 |
|
|
@@@PerlDef: |
3790 |
|
|
$r = '<!ATTLIST'.$self->SUPER::dtd_text.'>'; |
3791 |
|
|
##XDPAttlistElement |
3792 |
|
|
|
3793 |
|
|
IFClsETDef: |
3794 |
|
|
@IFQName: XDPEnumGroupElement |
3795 |
|
|
@ETQName: xdp|enum-group |
3796 |
|
|
@ClsQName: ManakaiDOMXDPEnumGroupElement |
3797 |
|
|
|
3798 |
|
|
@IFISA: XDPElement |
3799 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3800 |
|
|
|
3801 |
|
|
@enDesc: |
3802 |
|
|
An <XE::xdp|enum-group> element represents an XML enumeration |
3803 |
|
|
group in an attribute definition. |
3804 |
|
|
|
3805 |
|
|
@CAttr: |
3806 |
|
|
@@Name: dtdText |
3807 |
|
|
@@Type: DOMString |
3808 |
|
|
@@Get: |
3809 |
|
|
@@@PerlDef: |
3810 |
|
|
$r = '('.$self->SUPER::dtd_text.')'; |
3811 |
|
|
##XDPEnumGroupElement |
3812 |
|
|
|
3813 |
|
|
IFClsETDef: |
3814 |
|
|
@IFQName: XDPEntityElement |
3815 |
|
|
@ETQName: xdp|entity |
3816 |
|
|
@ClsQName: ManakaiDOMXDPEntityElement |
3817 |
|
|
|
3818 |
|
|
@IFISA: XDPElement |
3819 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3820 |
|
|
|
3821 |
|
|
@enDesc: |
3822 |
|
|
An <XE::xdp|entity> element represents an XML <XML::ENTITY> |
3823 |
|
|
declaration. |
3824 |
|
|
|
3825 |
|
|
@CAttr: |
3826 |
|
|
@@Name: dtdText |
3827 |
|
|
@@Type: DOMString |
3828 |
|
|
@@Get: |
3829 |
|
|
@@@PerlDef: |
3830 |
|
|
$r = '<!ENTITY'.$self->SUPER::dtd_text.'>'; |
3831 |
|
|
##XDPEntityElement |
3832 |
|
|
|
3833 |
|
|
IFClsETDef: |
3834 |
|
|
@IFQName: XDPNotationElement |
3835 |
|
|
@ETQName: xdp|notation |
3836 |
|
|
@ClsQName: ManakaiDOMXDPNotationElement |
3837 |
|
|
|
3838 |
|
|
@IFISA: XDPElement |
3839 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3840 |
|
|
|
3841 |
|
|
@enDesc: |
3842 |
|
|
An <XE::xdp|notation> element represents an XML <XML::NOTATION> |
3843 |
|
|
declaration. |
3844 |
|
|
|
3845 |
|
|
@CAttr: |
3846 |
|
|
@@Name: dtdText |
3847 |
|
|
@@Type: DOMString |
3848 |
|
|
@@Get: |
3849 |
|
|
@@@PerlDef: |
3850 |
|
|
$r = '<!NOTATION'.$self->SUPER::dtd_text.'>'; |
3851 |
|
|
##XDPNotationElement |
3852 |
|
|
|
3853 |
|
|
IFClsETDef: |
3854 |
|
|
@IFQName: XDPMarkedSectionElement |
3855 |
|
|
@ETQName: xdp|marked-section |
3856 |
|
|
@ClsQName: ManakaiDOMXDPMarkedSectionElement |
3857 |
|
|
|
3858 |
|
|
@IFISA: XDPElement |
3859 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3860 |
|
|
|
3861 |
|
|
@enDesc: |
3862 |
|
|
An <XE::xdp|marked-section> element represents an XML conditional |
3863 |
|
|
section. |
3864 |
|
|
|
3865 |
|
|
@CAttr: |
3866 |
|
|
@@Name: dtdText |
3867 |
|
|
@@Type: DOMString |
3868 |
|
|
@@Get: |
3869 |
|
|
@@@PerlDef: |
3870 |
|
|
$r = '<!['.$self->SUPER::dtd_text.']]>'; |
3871 |
|
|
##XDPMarkedSectionElement |
3872 |
|
|
|
3873 |
|
|
IFClsETDef: |
3874 |
|
|
@IFQName: XDPMarkedSectionStatusElement |
3875 |
|
|
@ETQName: xdp|marked-section-status |
3876 |
|
|
@ClsQName: ManakaiDOMXDPMarkedSectionStatusElement |
3877 |
|
|
|
3878 |
|
|
@IFISA: XDPElement |
3879 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3880 |
|
|
|
3881 |
|
|
@enDesc: |
3882 |
|
|
An <XE::xdp|marked-section-status> element represents the |
3883 |
|
|
status part of an XML marked section. |
3884 |
|
|
|
3885 |
|
|
@CAttr: |
3886 |
|
|
@@Name: dtdText |
3887 |
|
|
@@Type: DOMString |
3888 |
|
|
@@Get: |
3889 |
|
|
@@@PerlDef: |
3890 |
|
|
$r = $self->SUPER::dtd_text.'['; |
3891 |
|
|
##XDPMarkedSectionStatusElement |
3892 |
|
|
|
3893 |
|
|
IFClsETDef: |
3894 |
|
|
@IFQName: XDPCommentElement |
3895 |
|
|
@ETQName: xdp|comment |
3896 |
|
|
@ClsQName: ManakaiDOMXDPCommentElement |
3897 |
|
|
|
3898 |
|
|
@IFISA: XDPElement |
3899 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3900 |
|
|
|
3901 |
|
|
@enDesc: |
3902 |
|
|
An <XE::xdp|comment> element represents an XML comment. |
3903 |
|
|
|
3904 |
|
|
@CAttr: |
3905 |
|
|
@@Name: dtdText |
3906 |
|
|
@@Type: DOMString |
3907 |
|
|
@@Get: |
3908 |
|
|
@@@PerlDef: |
3909 |
|
|
$r = $self->SUPER::dtd_text; |
3910 |
|
|
$r =~ s/--/- - /g; |
3911 |
|
|
$r = '<!--'.$r.'-->'; |
3912 |
|
|
##XDPCommentElement |
3913 |
|
|
|
3914 |
|
|
IFClsETDef: |
3915 |
|
|
@IFQName: XDPPIElement |
3916 |
|
|
@ETQName: xdp|pi |
3917 |
|
|
@ClsQName: ManakaiDOMXDPPIElement |
3918 |
|
|
|
3919 |
|
|
@IFISA: XDPElement |
3920 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3921 |
|
|
|
3922 |
|
|
@enDesc: |
3923 |
|
|
An <XE::xdp|pi> element represents an XML processing |
3924 |
|
|
instruction. |
3925 |
|
|
|
3926 |
|
|
@CAttr: |
3927 |
|
|
@@Name: dtdText |
3928 |
|
|
@@Type: DOMString |
3929 |
|
|
@@Get: |
3930 |
|
|
@@@PerlDef: |
3931 |
|
|
$r = $self->SUPER::dtd_text; |
3932 |
|
|
$r =~ s/\?>/?>/g; |
3933 |
|
|
$r = '<?'.$r.'?>'; |
3934 |
|
|
##XDPPIElement |
3935 |
|
|
|
3936 |
|
|
IFClsETDef: |
3937 |
|
|
@IFQName: XDPTextDeclElement |
3938 |
|
|
@ETQName: xdp|text-decl |
3939 |
|
|
@ClsQName: ManakaiDOMXDPTextDeclElement |
3940 |
|
|
|
3941 |
|
|
@IFISA: XDPElement |
3942 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3943 |
|
|
|
3944 |
|
|
@enDesc: |
3945 |
|
|
An <XE::xdp|text-decl> element represents an XML text declaration. |
3946 |
|
|
|
3947 |
|
|
@CAttr: |
3948 |
|
|
@@Name: dtdText |
3949 |
|
|
@@Type: DOMString |
3950 |
|
|
@@Get: |
3951 |
|
|
@@@PerlDef: |
3952 |
|
|
$r = $self->SUPER::dtd_text; |
3953 |
|
|
$r =~ s/\?>/?>/g; |
3954 |
wakaba |
1.2 |
$r = '<?xml'.$r.'?>'; |
3955 |
wakaba |
1.1 |
##XDPTextDeclElement |
3956 |
|
|
|
3957 |
|
|
IFClsETDef: |
3958 |
|
|
@IFQName: XDPPAttrElement |
3959 |
|
|
@ETQName: xdp|pattr |
3960 |
|
|
@ClsQName: ManakaiDOMXDPPAttrElement |
3961 |
|
|
|
3962 |
|
|
@IFISA: XDPElement |
3963 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3964 |
|
|
|
3965 |
|
|
@enDesc: |
3966 |
|
|
An <XE::xdp|pattr> element represents a pseudo-attribute. |
3967 |
|
|
##XDPPAttrElement |
3968 |
|
|
|
3969 |
|
|
IFClsETDef: |
3970 |
|
|
@IFQName: XDPPERefElement |
3971 |
|
|
@ETQName: xdp|peref |
3972 |
|
|
@ClsQName: ManakaiDOMXDPPERefElement |
3973 |
|
|
|
3974 |
|
|
@IFISA: XDPElement |
3975 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3976 |
|
|
|
3977 |
|
|
@enDesc: |
3978 |
|
|
An <XE::xdp|peref> element represents an XML parameter entity |
3979 |
|
|
reference. |
3980 |
|
|
|
3981 |
|
|
@CAttr: |
3982 |
|
|
@@Name: dtdText |
3983 |
|
|
@@Type: DOMString |
3984 |
|
|
@@Get: |
3985 |
|
|
@@@PerlDef: |
3986 |
|
|
$r = '%'.$self->SUPER::dtd_text.';'; |
3987 |
|
|
##XDPPERefElement |
3988 |
|
|
|
3989 |
|
|
IFClsETDef: |
3990 |
|
|
@IFQName: XDPGERefElement |
3991 |
|
|
@ETQName: xdp|geref |
3992 |
|
|
@ClsQName: ManakaiDOMXDPGERefElement |
3993 |
|
|
|
3994 |
|
|
@IFISA: XDPElement |
3995 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3996 |
|
|
|
3997 |
|
|
@enDesc: |
3998 |
|
|
An <XE::xdp|geref> element represents an XML general entity |
3999 |
|
|
reference. |
4000 |
|
|
|
4001 |
|
|
@CAttr: |
4002 |
|
|
@@Name: dtdText |
4003 |
|
|
@@Type: DOMString |
4004 |
|
|
@@Get: |
4005 |
|
|
@@@PerlDef: |
4006 |
|
|
$r = '&'.$self->SUPER::dtd_text.';'; |
4007 |
|
|
##XDPGERefElement |
4008 |
|
|
|
4009 |
|
|
IFClsETDef: |
4010 |
|
|
@IFQName: XDPNCRElement |
4011 |
|
|
@ETQName: xdp|ncr |
4012 |
|
|
@ClsQName: ManakaiDOMXDPNCRElement |
4013 |
|
|
|
4014 |
|
|
@IFISA: XDPElement |
4015 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4016 |
|
|
|
4017 |
|
|
@enDesc: |
4018 |
|
|
An <XE::xdp|ncr> element represents an XML numeric character |
4019 |
|
|
reference. |
4020 |
|
|
|
4021 |
|
|
@CAttr: |
4022 |
|
|
@@Name: dtdText |
4023 |
|
|
@@Type: DOMString |
4024 |
|
|
@@Get: |
4025 |
|
|
@@@PerlDef: |
4026 |
|
|
$r = '&#'.$self->SUPER::dtd_text.';'; |
4027 |
|
|
##XDPNCRElement |
4028 |
|
|
|
4029 |
|
|
IFClsETDef: |
4030 |
|
|
@IFQName: XDPHCRElement |
4031 |
|
|
@ETQName: xdp|hcr |
4032 |
|
|
@ClsQName: ManakaiDOMXDPHCRElement |
4033 |
|
|
|
4034 |
|
|
@IFISA: XDPElement |
4035 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4036 |
|
|
|
4037 |
|
|
@enDesc: |
4038 |
|
|
An <XE::xdp|hcr> element represents an XML hexadecimal character |
4039 |
|
|
reference. |
4040 |
|
|
|
4041 |
|
|
@CAttr: |
4042 |
|
|
@@Name: dtdText |
4043 |
|
|
@@Type: DOMString |
4044 |
|
|
@@Get: |
4045 |
|
|
@@@PerlDef: |
4046 |
|
|
$r = '&#x'.$self->SUPER::dtd_text.';'; |
4047 |
|
|
##XDPHCRElement |
4048 |
|
|
|
4049 |
|
|
IFClsETDef: |
4050 |
|
|
@IFQName: XDPRNIKeywordElement |
4051 |
|
|
@ETQName: xdp|rni-keyword |
4052 |
|
|
@ClsQName: ManakaiDOMXDPRNIKeywordElement |
4053 |
|
|
|
4054 |
|
|
@IFISA: XDPElement |
4055 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4056 |
|
|
|
4057 |
|
|
@enDesc: |
4058 |
|
|
An <XE::xdp|rni-keyword> element represents an XML keyword |
4059 |
|
|
prepended by a <CHAR::NUMBER SIGN>. |
4060 |
|
|
|
4061 |
|
|
@CAttr: |
4062 |
|
|
@@Name: dtdText |
4063 |
|
|
@@Type: DOMString |
4064 |
|
|
@@Get: |
4065 |
|
|
@@@PerlDef: |
4066 |
|
|
$r = '#'.$self->SUPER::dtd_text; |
4067 |
|
|
##XDPRNIKeywordElement |
4068 |
|
|
|
4069 |
|
|
IFClsETDef: |
4070 |
|
|
@IFQName: XDPEntityValueElement |
4071 |
|
|
@ETQName: xdp|entity-value |
4072 |
|
|
@ClsQName: ManakaiDOMXDPEntityValueElement |
4073 |
|
|
|
4074 |
|
|
@IFISA: XDPElement |
4075 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4076 |
|
|
|
4077 |
|
|
@enDesc: |
4078 |
|
|
An <XE::xdp|entity-value> element represents an XML entity |
4079 |
|
|
value. |
4080 |
|
|
|
4081 |
|
|
@CAttr: |
4082 |
|
|
@@Name: dtdText |
4083 |
|
|
@@Type: DOMString |
4084 |
|
|
@@Get: |
4085 |
|
|
@@@PerlDef: |
4086 |
|
|
require Message::DOM::Traversal; |
4087 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4088 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4089 |
|
|
my $tw = $doctrv->create_tree_walker |
4090 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4091 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
4092 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4093 |
|
|
sub { |
4094 |
|
|
my $node = $_[1]; |
4095 |
|
|
if ($node-><AG::Node.nodeType> |
4096 |
|
|
== <C::Node.ELEMENT_NODE>) { |
4097 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
4098 |
|
|
if (not defined $ns) { |
4099 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4100 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
4101 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4102 |
|
|
} else { |
4103 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4104 |
|
|
} |
4105 |
|
|
} else { |
4106 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4107 |
|
|
} |
4108 |
|
|
}, true); |
4109 |
|
|
my $current = $tw->first_child; |
4110 |
|
|
$r = ''; |
4111 |
|
|
C: while (defined $current) { |
4112 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4113 |
|
|
if ({ |
4114 |
wakaba |
1.6 |
<Q::xdp|attr-definition> => true, |
4115 |
wakaba |
1.1 |
<Q::xdp|peref> => true, |
4116 |
|
|
}->{$current->manakai_expanded_uri}) { |
4117 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
4118 |
|
|
} else { |
4119 |
|
|
my $v = $current-><AG::XDPElement.dtdText>; |
4120 |
|
|
$v =~ s/&/&/g; |
4121 |
|
|
$v =~ s/%/%/g; |
4122 |
|
|
$r .= $v; |
4123 |
|
|
} |
4124 |
|
|
} else { |
4125 |
|
|
my $v = $current-><AG::Node.textContent>; |
4126 |
|
|
$v =~ s/&/&/g; |
4127 |
|
|
$v =~ s/%/%/g; |
4128 |
|
|
$r .= $v; |
4129 |
|
|
} |
4130 |
|
|
|
4131 |
|
|
$current = $tw->next_sibling; |
4132 |
|
|
} # C |
4133 |
|
|
|
4134 |
|
|
if ($r =~ /"/) { |
4135 |
|
|
$r =~ s/'/'/g; |
4136 |
|
|
$r = "'".$r."'"; |
4137 |
|
|
} else { |
4138 |
|
|
$r =~ s/"/"/g; |
4139 |
|
|
$r = '"'.$r.'"'; |
4140 |
|
|
} |
4141 |
|
|
##XDPEntityValueElement |
4142 |
|
|
|
4143 |
|
|
IFClsETDef: |
4144 |
|
|
@IFQName: XDPAttrLiteralElement |
4145 |
|
|
@ETQName: xdp|attr-literal |
4146 |
|
|
@ClsQName: ManakaiDOMXDPAttrLiteralElement |
4147 |
|
|
|
4148 |
|
|
@IFISA: XDPElement |
4149 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4150 |
|
|
|
4151 |
|
|
@enDesc: |
4152 |
|
|
An <XE::xdp|attr-literal> element represents an XML attribute |
4153 |
|
|
value literal. |
4154 |
|
|
|
4155 |
|
|
@CAttr: |
4156 |
|
|
@@Name: dtdText |
4157 |
|
|
@@Type: DOMString |
4158 |
|
|
@@Get: |
4159 |
|
|
@@@PerlDef: |
4160 |
|
|
require Message::DOM::Traversal; |
4161 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4162 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4163 |
|
|
my $tw = $doctrv->create_tree_walker |
4164 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4165 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
4166 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4167 |
|
|
sub { |
4168 |
|
|
my $node = $_[1]; |
4169 |
|
|
if ($node-><AG::Node.nodeType> |
4170 |
|
|
== <C::Node.ELEMENT_NODE>) { |
4171 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
4172 |
|
|
if (not defined $ns) { |
4173 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4174 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
4175 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4176 |
|
|
} else { |
4177 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4178 |
|
|
} |
4179 |
|
|
} else { |
4180 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4181 |
|
|
} |
4182 |
|
|
}, true); |
4183 |
|
|
my $current = $tw->first_child; |
4184 |
|
|
$r = ''; |
4185 |
|
|
C: while (defined $current) { |
4186 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4187 |
|
|
if ({ |
4188 |
|
|
<Q::xdp|geref> => true, |
4189 |
|
|
<Q::xdp|ncr> => true, |
4190 |
|
|
<Q::xdp|hcr> => true, |
4191 |
|
|
}->{$current->manakai_expanded_uri}) { |
4192 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
4193 |
|
|
} else { |
4194 |
|
|
my $v = $current-><AG::XDPElement.dtdText>; |
4195 |
|
|
$v =~ s/&/&/g; |
4196 |
|
|
$r .= $v; |
4197 |
|
|
} |
4198 |
|
|
} else { |
4199 |
|
|
my $v = $current-><AG::Node.textContent>; |
4200 |
|
|
$v =~ s/&/&/g; |
4201 |
|
|
$r .= $v; |
4202 |
|
|
} |
4203 |
|
|
|
4204 |
|
|
$current = $tw->next_sibling; |
4205 |
|
|
} # C |
4206 |
|
|
|
4207 |
|
|
if ($r =~ /"/) { |
4208 |
|
|
$r =~ s/'/'/g; |
4209 |
|
|
$r = "'".$r."'"; |
4210 |
|
|
} else { |
4211 |
|
|
$r =~ s/"/"/g; |
4212 |
|
|
$r = '"'.$r.'"'; |
4213 |
|
|
} |
4214 |
wakaba |
1.8 |
##XDPAttrLiteralElement |
4215 |
wakaba |
1.1 |
|
4216 |
|
|
IFClsETDef: |
4217 |
|
|
@IFQName: XDPMinimumLiteralElement |
4218 |
|
|
@ETQName: xdp|minimum-literal |
4219 |
|
|
@ClsQName: ManakaiDOMXDPMinimumLiteralElement |
4220 |
|
|
|
4221 |
|
|
@IFISA: XDPElement |
4222 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4223 |
|
|
|
4224 |
|
|
@enDesc: |
4225 |
|
|
An <XE::xdp|minimum-literal> element represents an XML public identifier |
4226 |
|
|
literal. |
4227 |
|
|
|
4228 |
|
|
@CAttr: |
4229 |
|
|
@@Name: dtdText |
4230 |
|
|
@@Type: DOMString |
4231 |
|
|
@@Get: |
4232 |
|
|
@@@PerlDef: |
4233 |
|
|
$r = $self->SUPER::dtd_text; |
4234 |
|
|
$r =~ s/"/%22/g; |
4235 |
|
|
$r = '"'.$r.'"'; |
4236 |
|
|
##XDPMinimumLiteralElement |
4237 |
|
|
|
4238 |
|
|
IFClsETDef: |
4239 |
|
|
@IFQName: XDPSystemLiteralElement |
4240 |
|
|
@ETQName: xdp|system-literal |
4241 |
|
|
@ClsQName: ManakaiDOMXDPSystemLiteralElement |
4242 |
|
|
|
4243 |
|
|
@IFISA: XDPElement |
4244 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4245 |
|
|
|
4246 |
|
|
@enDesc: |
4247 |
|
|
An <XE::xdp|system-literal> element represents an XML system |
4248 |
|
|
literal. |
4249 |
|
|
|
4250 |
|
|
@CAttr: |
4251 |
|
|
@@Name: dtdText |
4252 |
|
|
@@Type: DOMString |
4253 |
|
|
@@Get: |
4254 |
|
|
@@@PerlDef: |
4255 |
|
|
$r = $self->SUPER::dtd_text; |
4256 |
|
|
$r =~ s/"/%22/g; |
4257 |
|
|
$r = '"'.$r.'"'; |
4258 |
|
|
##XDPSystemLiteralElement |
4259 |
wakaba |
1.4 |
|
4260 |
|
|
IFClsETDef: |
4261 |
|
|
@IFQName: XDPIfElement |
4262 |
|
|
@ETQName: xdp|if |
4263 |
|
|
@ClsQName: ManakaiDOMXDPIfElement |
4264 |
|
|
|
4265 |
|
|
@IFISA: XDPElement |
4266 |
|
|
@ClsISA: ManakaiDOMXDPElement |
4267 |
|
|
|
4268 |
|
|
@enDesc: |
4269 |
|
|
An <XE::xdp|if> element represents a set of XML DTD declarations |
4270 |
|
|
with a conditional section that can be enabled by a |
4271 |
|
|
parameter entity. |
4272 |
|
|
|
4273 |
|
|
@CAttr: |
4274 |
|
|
@@Name: dtdText |
4275 |
|
|
@@Type: DOMString |
4276 |
|
|
@@Get: |
4277 |
|
|
@@@PerlDef: |
4278 |
|
|
__DEEP{ |
4279 |
|
|
require Message::DOM::Traversal; |
4280 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4281 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4282 |
|
|
my $tw = $doctrv->create_tree_walker |
4283 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4284 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
4285 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4286 |
|
|
sub { |
4287 |
|
|
my $node = $_[1]; |
4288 |
|
|
if ($node-><AG::Node.nodeType> |
4289 |
|
|
== <C::Node.ELEMENT_NODE>) { |
4290 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
4291 |
|
|
if (not defined $ns) { |
4292 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4293 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
4294 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4295 |
|
|
} else { |
4296 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
4297 |
|
|
} |
4298 |
|
|
} else { |
4299 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4300 |
|
|
} |
4301 |
|
|
}, true); |
4302 |
|
|
my $current = $tw->first_child; |
4303 |
|
|
|
4304 |
|
|
my $pename = $self-><M::Element.getAttributeNS> |
4305 |
|
|
(null, 'status-entity'); |
4306 |
|
|
$r = '<![%'.$pename.";[\n"; |
4307 |
|
|
|
4308 |
|
|
my $has_true; |
4309 |
|
|
C: while (defined $current) { |
4310 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4311 |
|
|
if (not $has_true and |
4312 |
|
|
$current->manakai_expanded_uri eq <Q::xdp|true>) { |
4313 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
4314 |
|
|
$r .= "<!-- end of $pename -->]]>"; |
4315 |
|
|
$has_true = true; |
4316 |
|
|
} elsif ($current->manakai_expanded_uri eq <Q::xdp|false>) { |
4317 |
|
|
my $v = $current-><AG::XDPElement.dtdText>; |
4318 |
|
|
$r .= "\n" if length $v; |
4319 |
|
|
$r .= $v; |
4320 |
|
|
} else { |
4321 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
4322 |
|
|
} |
4323 |
|
|
} else { |
4324 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
4325 |
|
|
} |
4326 |
|
|
|
4327 |
|
|
$current = $tw->next_sibling; |
4328 |
|
|
} # C |
4329 |
|
|
|
4330 |
|
|
$r .= "<!-- end of $pename -->]]>" unless $has_true; |
4331 |
|
|
}__; |
4332 |
|
|
##XDPIfElement |