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