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