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