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.2 |
$Date: 2006/05/13 12:06:21 $ |
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.1 |
##XDPDocument |
3224 |
|
|
|
3225 |
|
|
IFClsDef: |
3226 |
|
|
@IFQName: XDPElement |
3227 |
|
|
@ClsQName: ManakaiDOMXDPElement |
3228 |
|
|
|
3229 |
|
|
@IFISA: Element |
3230 |
|
|
@ClsISA: te|ManakaiDOMElement |
3231 |
|
|
|
3232 |
|
|
@s:elementType: AnyXDPElement||ManakaiDOM|all |
3233 |
|
|
|
3234 |
|
|
@Test: |
3235 |
|
|
@@QName: createElementNS.XDPElement.test |
3236 |
|
|
@@PerlDef: |
3237 |
|
|
my $doc; |
3238 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3239 |
|
|
|
3240 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::xdp:>, 'anElement'); |
3241 |
|
|
|
3242 |
|
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3243 |
|
|
|
3244 |
|
|
@Attr: |
3245 |
|
|
@@Name: dtdText |
3246 |
|
|
@@enDesc: |
3247 |
|
|
The serialized representation of the element and its descendants. |
3248 |
|
|
@@Type: DOMString |
3249 |
|
|
@@Get: |
3250 |
|
|
@@@enDesc: |
3251 |
|
|
{ISSUE:: |
3252 |
|
|
Definition |
3253 |
|
|
} |
3254 |
|
|
@@@PerlDef: |
3255 |
|
|
require Message::DOM::Traversal; |
3256 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
3257 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
3258 |
|
|
my $tw = $doctrv->create_tree_walker |
3259 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
3260 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
3261 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
3262 |
|
|
sub { |
3263 |
|
|
my $node = $_[1]; |
3264 |
|
|
if ($node-><AG::Node.nodeType> |
3265 |
|
|
== <C::Node.ELEMENT_NODE>) { |
3266 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
3267 |
|
|
if (not defined $ns) { |
3268 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3269 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
3270 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3271 |
|
|
} else { |
3272 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3273 |
|
|
} |
3274 |
|
|
} else { |
3275 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3276 |
|
|
} |
3277 |
|
|
}, true); |
3278 |
|
|
my $current = $tw->first_child; |
3279 |
|
|
$r = ''; |
3280 |
|
|
C: while (defined $current) { |
3281 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
3282 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
3283 |
|
|
} else { |
3284 |
|
|
$r .= $current-><AG::Node.textContent>; |
3285 |
|
|
} |
3286 |
|
|
|
3287 |
|
|
$current = $tw->next_sibling; |
3288 |
|
|
} # C |
3289 |
|
|
##XDPElement |
3290 |
|
|
|
3291 |
|
|
ResourceDef: |
3292 |
|
|
@QName: AnyXDPElement |
3293 |
|
|
@DISCore:resourceType: s|AnyElementInNS |
3294 |
|
|
@AppName: |
3295 |
|
|
@@@: xdp|* |
3296 |
|
|
@@ContentType: DISCore|QName |
3297 |
|
|
@ForCheck: =ManakaiDOM|all |
3298 |
|
|
|
3299 |
|
|
IFClsETDef: |
3300 |
|
|
@IFQName: XDPPEElement |
3301 |
|
|
@ETQName: xdp|pe |
3302 |
|
|
@ClsQName: ManakaiDOMXDPPEElement |
3303 |
|
|
|
3304 |
|
|
@IFISA: XDPElement |
3305 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3306 |
|
|
|
3307 |
|
|
@enDesc: |
3308 |
|
|
An <XE::xdp|pe> element represents an XML parameter |
3309 |
|
|
entity, an XML external subset entity, or an XML internal subset. |
3310 |
|
|
##XDPPEElement |
3311 |
|
|
|
3312 |
|
|
IFClsETDef: |
3313 |
|
|
@IFQName: XDPElementElement |
3314 |
|
|
@ETQName: xdp|element |
3315 |
|
|
@ClsQName: ManakaiDOMXDPElementElement |
3316 |
|
|
|
3317 |
|
|
@IFISA: XDPElement |
3318 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3319 |
|
|
|
3320 |
|
|
@enDesc: |
3321 |
|
|
An <XE::xdp|element> element represents an XML <XML::ELEMENT> |
3322 |
|
|
declaration. |
3323 |
|
|
|
3324 |
|
|
@CAttr: |
3325 |
|
|
@@Name: dtdText |
3326 |
|
|
@@Type: DOMString |
3327 |
|
|
@@Get: |
3328 |
|
|
@@@PerlDef: |
3329 |
|
|
$r = '<!ELEMENT'.$self->SUPER::dtd_text.'>'; |
3330 |
|
|
##XDPElementElement |
3331 |
|
|
|
3332 |
|
|
IFClsETDef: |
3333 |
|
|
@IFQName: XDPModelGroupElement |
3334 |
|
|
@ETQName: xdp|model-group |
3335 |
|
|
@ClsQName: ManakaiDOMXDPModelGroupElement |
3336 |
|
|
|
3337 |
|
|
@IFISA: XDPElement |
3338 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3339 |
|
|
|
3340 |
|
|
@enDesc: |
3341 |
|
|
An <XE::xdp|model-group> element represents an XML model |
3342 |
|
|
group. |
3343 |
|
|
|
3344 |
|
|
@CAttr: |
3345 |
|
|
@@Name: dtdText |
3346 |
|
|
@@Type: DOMString |
3347 |
|
|
@@Get: |
3348 |
|
|
@@@PerlDef: |
3349 |
|
|
$r = '('.$self->SUPER::dtd_text.')'; |
3350 |
|
|
##XDPModelGroupElement |
3351 |
|
|
|
3352 |
|
|
IFClsETDef: |
3353 |
|
|
@IFQName: XDPAttlistElement |
3354 |
|
|
@ETQName: xdp|attlist |
3355 |
|
|
@ClsQName: ManakaiDOMXDPAttlistElement |
3356 |
|
|
|
3357 |
|
|
@IFISA: XDPElement |
3358 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3359 |
|
|
|
3360 |
|
|
@enDesc: |
3361 |
|
|
An <XE::xdp|attlist> element represents an XML <XML::ATTLIST> |
3362 |
|
|
declaration. |
3363 |
|
|
|
3364 |
|
|
@CAttr: |
3365 |
|
|
@@Name: dtdText |
3366 |
|
|
@@Type: DOMString |
3367 |
|
|
@@Get: |
3368 |
|
|
@@@PerlDef: |
3369 |
|
|
$r = '<!ATTLIST'.$self->SUPER::dtd_text.'>'; |
3370 |
|
|
##XDPAttlistElement |
3371 |
|
|
|
3372 |
|
|
IFClsETDef: |
3373 |
|
|
@IFQName: XDPEnumGroupElement |
3374 |
|
|
@ETQName: xdp|enum-group |
3375 |
|
|
@ClsQName: ManakaiDOMXDPEnumGroupElement |
3376 |
|
|
|
3377 |
|
|
@IFISA: XDPElement |
3378 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3379 |
|
|
|
3380 |
|
|
@enDesc: |
3381 |
|
|
An <XE::xdp|enum-group> element represents an XML enumeration |
3382 |
|
|
group in an attribute definition. |
3383 |
|
|
|
3384 |
|
|
@CAttr: |
3385 |
|
|
@@Name: dtdText |
3386 |
|
|
@@Type: DOMString |
3387 |
|
|
@@Get: |
3388 |
|
|
@@@PerlDef: |
3389 |
|
|
$r = '('.$self->SUPER::dtd_text.')'; |
3390 |
|
|
##XDPEnumGroupElement |
3391 |
|
|
|
3392 |
|
|
IFClsETDef: |
3393 |
|
|
@IFQName: XDPEntityElement |
3394 |
|
|
@ETQName: xdp|entity |
3395 |
|
|
@ClsQName: ManakaiDOMXDPEntityElement |
3396 |
|
|
|
3397 |
|
|
@IFISA: XDPElement |
3398 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3399 |
|
|
|
3400 |
|
|
@enDesc: |
3401 |
|
|
An <XE::xdp|entity> element represents an XML <XML::ENTITY> |
3402 |
|
|
declaration. |
3403 |
|
|
|
3404 |
|
|
@CAttr: |
3405 |
|
|
@@Name: dtdText |
3406 |
|
|
@@Type: DOMString |
3407 |
|
|
@@Get: |
3408 |
|
|
@@@PerlDef: |
3409 |
|
|
$r = '<!ENTITY'.$self->SUPER::dtd_text.'>'; |
3410 |
|
|
##XDPEntityElement |
3411 |
|
|
|
3412 |
|
|
IFClsETDef: |
3413 |
|
|
@IFQName: XDPNotationElement |
3414 |
|
|
@ETQName: xdp|notation |
3415 |
|
|
@ClsQName: ManakaiDOMXDPNotationElement |
3416 |
|
|
|
3417 |
|
|
@IFISA: XDPElement |
3418 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3419 |
|
|
|
3420 |
|
|
@enDesc: |
3421 |
|
|
An <XE::xdp|notation> element represents an XML <XML::NOTATION> |
3422 |
|
|
declaration. |
3423 |
|
|
|
3424 |
|
|
@CAttr: |
3425 |
|
|
@@Name: dtdText |
3426 |
|
|
@@Type: DOMString |
3427 |
|
|
@@Get: |
3428 |
|
|
@@@PerlDef: |
3429 |
|
|
$r = '<!NOTATION'.$self->SUPER::dtd_text.'>'; |
3430 |
|
|
##XDPNotationElement |
3431 |
|
|
|
3432 |
|
|
IFClsETDef: |
3433 |
|
|
@IFQName: XDPMarkedSectionElement |
3434 |
|
|
@ETQName: xdp|marked-section |
3435 |
|
|
@ClsQName: ManakaiDOMXDPMarkedSectionElement |
3436 |
|
|
|
3437 |
|
|
@IFISA: XDPElement |
3438 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3439 |
|
|
|
3440 |
|
|
@enDesc: |
3441 |
|
|
An <XE::xdp|marked-section> element represents an XML conditional |
3442 |
|
|
section. |
3443 |
|
|
|
3444 |
|
|
@CAttr: |
3445 |
|
|
@@Name: dtdText |
3446 |
|
|
@@Type: DOMString |
3447 |
|
|
@@Get: |
3448 |
|
|
@@@PerlDef: |
3449 |
|
|
$r = '<!['.$self->SUPER::dtd_text.']]>'; |
3450 |
|
|
##XDPMarkedSectionElement |
3451 |
|
|
|
3452 |
|
|
IFClsETDef: |
3453 |
|
|
@IFQName: XDPMarkedSectionStatusElement |
3454 |
|
|
@ETQName: xdp|marked-section-status |
3455 |
|
|
@ClsQName: ManakaiDOMXDPMarkedSectionStatusElement |
3456 |
|
|
|
3457 |
|
|
@IFISA: XDPElement |
3458 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3459 |
|
|
|
3460 |
|
|
@enDesc: |
3461 |
|
|
An <XE::xdp|marked-section-status> element represents the |
3462 |
|
|
status part of an XML marked section. |
3463 |
|
|
|
3464 |
|
|
@CAttr: |
3465 |
|
|
@@Name: dtdText |
3466 |
|
|
@@Type: DOMString |
3467 |
|
|
@@Get: |
3468 |
|
|
@@@PerlDef: |
3469 |
|
|
$r = $self->SUPER::dtd_text.'['; |
3470 |
|
|
##XDPMarkedSectionStatusElement |
3471 |
|
|
|
3472 |
|
|
IFClsETDef: |
3473 |
|
|
@IFQName: XDPCommentElement |
3474 |
|
|
@ETQName: xdp|comment |
3475 |
|
|
@ClsQName: ManakaiDOMXDPCommentElement |
3476 |
|
|
|
3477 |
|
|
@IFISA: XDPElement |
3478 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3479 |
|
|
|
3480 |
|
|
@enDesc: |
3481 |
|
|
An <XE::xdp|comment> element represents an XML comment. |
3482 |
|
|
|
3483 |
|
|
@CAttr: |
3484 |
|
|
@@Name: dtdText |
3485 |
|
|
@@Type: DOMString |
3486 |
|
|
@@Get: |
3487 |
|
|
@@@PerlDef: |
3488 |
|
|
$r = $self->SUPER::dtd_text; |
3489 |
|
|
$r =~ s/--/- - /g; |
3490 |
|
|
$r = '<!--'.$r.'-->'; |
3491 |
|
|
##XDPCommentElement |
3492 |
|
|
|
3493 |
|
|
IFClsETDef: |
3494 |
|
|
@IFQName: XDPPIElement |
3495 |
|
|
@ETQName: xdp|pi |
3496 |
|
|
@ClsQName: ManakaiDOMXDPPIElement |
3497 |
|
|
|
3498 |
|
|
@IFISA: XDPElement |
3499 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3500 |
|
|
|
3501 |
|
|
@enDesc: |
3502 |
|
|
An <XE::xdp|pi> element represents an XML processing |
3503 |
|
|
instruction. |
3504 |
|
|
|
3505 |
|
|
@CAttr: |
3506 |
|
|
@@Name: dtdText |
3507 |
|
|
@@Type: DOMString |
3508 |
|
|
@@Get: |
3509 |
|
|
@@@PerlDef: |
3510 |
|
|
$r = $self->SUPER::dtd_text; |
3511 |
|
|
$r =~ s/\?>/?>/g; |
3512 |
|
|
$r = '<?'.$r.'?>'; |
3513 |
|
|
##XDPPIElement |
3514 |
|
|
|
3515 |
|
|
IFClsETDef: |
3516 |
|
|
@IFQName: XDPTextDeclElement |
3517 |
|
|
@ETQName: xdp|text-decl |
3518 |
|
|
@ClsQName: ManakaiDOMXDPTextDeclElement |
3519 |
|
|
|
3520 |
|
|
@IFISA: XDPElement |
3521 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3522 |
|
|
|
3523 |
|
|
@enDesc: |
3524 |
|
|
An <XE::xdp|text-decl> element represents an XML text declaration. |
3525 |
|
|
|
3526 |
|
|
@CAttr: |
3527 |
|
|
@@Name: dtdText |
3528 |
|
|
@@Type: DOMString |
3529 |
|
|
@@Get: |
3530 |
|
|
@@@PerlDef: |
3531 |
|
|
$r = $self->SUPER::dtd_text; |
3532 |
|
|
$r =~ s/\?>/?>/g; |
3533 |
wakaba |
1.2 |
$r = '<?xml'.$r.'?>'; |
3534 |
wakaba |
1.1 |
##XDPTextDeclElement |
3535 |
|
|
|
3536 |
|
|
IFClsETDef: |
3537 |
|
|
@IFQName: XDPPAttrElement |
3538 |
|
|
@ETQName: xdp|pattr |
3539 |
|
|
@ClsQName: ManakaiDOMXDPPAttrElement |
3540 |
|
|
|
3541 |
|
|
@IFISA: XDPElement |
3542 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3543 |
|
|
|
3544 |
|
|
@enDesc: |
3545 |
|
|
An <XE::xdp|pattr> element represents a pseudo-attribute. |
3546 |
|
|
##XDPPAttrElement |
3547 |
|
|
|
3548 |
|
|
IFClsETDef: |
3549 |
|
|
@IFQName: XDPPERefElement |
3550 |
|
|
@ETQName: xdp|peref |
3551 |
|
|
@ClsQName: ManakaiDOMXDPPERefElement |
3552 |
|
|
|
3553 |
|
|
@IFISA: XDPElement |
3554 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3555 |
|
|
|
3556 |
|
|
@enDesc: |
3557 |
|
|
An <XE::xdp|peref> element represents an XML parameter entity |
3558 |
|
|
reference. |
3559 |
|
|
|
3560 |
|
|
@CAttr: |
3561 |
|
|
@@Name: dtdText |
3562 |
|
|
@@Type: DOMString |
3563 |
|
|
@@Get: |
3564 |
|
|
@@@PerlDef: |
3565 |
|
|
$r = '%'.$self->SUPER::dtd_text.';'; |
3566 |
|
|
##XDPPERefElement |
3567 |
|
|
|
3568 |
|
|
IFClsETDef: |
3569 |
|
|
@IFQName: XDPGERefElement |
3570 |
|
|
@ETQName: xdp|geref |
3571 |
|
|
@ClsQName: ManakaiDOMXDPGERefElement |
3572 |
|
|
|
3573 |
|
|
@IFISA: XDPElement |
3574 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3575 |
|
|
|
3576 |
|
|
@enDesc: |
3577 |
|
|
An <XE::xdp|geref> element represents an XML general entity |
3578 |
|
|
reference. |
3579 |
|
|
|
3580 |
|
|
@CAttr: |
3581 |
|
|
@@Name: dtdText |
3582 |
|
|
@@Type: DOMString |
3583 |
|
|
@@Get: |
3584 |
|
|
@@@PerlDef: |
3585 |
|
|
$r = '&'.$self->SUPER::dtd_text.';'; |
3586 |
|
|
##XDPGERefElement |
3587 |
|
|
|
3588 |
|
|
IFClsETDef: |
3589 |
|
|
@IFQName: XDPNCRElement |
3590 |
|
|
@ETQName: xdp|ncr |
3591 |
|
|
@ClsQName: ManakaiDOMXDPNCRElement |
3592 |
|
|
|
3593 |
|
|
@IFISA: XDPElement |
3594 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3595 |
|
|
|
3596 |
|
|
@enDesc: |
3597 |
|
|
An <XE::xdp|ncr> element represents an XML numeric character |
3598 |
|
|
reference. |
3599 |
|
|
|
3600 |
|
|
@CAttr: |
3601 |
|
|
@@Name: dtdText |
3602 |
|
|
@@Type: DOMString |
3603 |
|
|
@@Get: |
3604 |
|
|
@@@PerlDef: |
3605 |
|
|
$r = '&#'.$self->SUPER::dtd_text.';'; |
3606 |
|
|
##XDPNCRElement |
3607 |
|
|
|
3608 |
|
|
IFClsETDef: |
3609 |
|
|
@IFQName: XDPHCRElement |
3610 |
|
|
@ETQName: xdp|hcr |
3611 |
|
|
@ClsQName: ManakaiDOMXDPHCRElement |
3612 |
|
|
|
3613 |
|
|
@IFISA: XDPElement |
3614 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3615 |
|
|
|
3616 |
|
|
@enDesc: |
3617 |
|
|
An <XE::xdp|hcr> element represents an XML hexadecimal character |
3618 |
|
|
reference. |
3619 |
|
|
|
3620 |
|
|
@CAttr: |
3621 |
|
|
@@Name: dtdText |
3622 |
|
|
@@Type: DOMString |
3623 |
|
|
@@Get: |
3624 |
|
|
@@@PerlDef: |
3625 |
|
|
$r = '&#x'.$self->SUPER::dtd_text.';'; |
3626 |
|
|
##XDPHCRElement |
3627 |
|
|
|
3628 |
|
|
IFClsETDef: |
3629 |
|
|
@IFQName: XDPRNIKeywordElement |
3630 |
|
|
@ETQName: xdp|rni-keyword |
3631 |
|
|
@ClsQName: ManakaiDOMXDPRNIKeywordElement |
3632 |
|
|
|
3633 |
|
|
@IFISA: XDPElement |
3634 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3635 |
|
|
|
3636 |
|
|
@enDesc: |
3637 |
|
|
An <XE::xdp|rni-keyword> element represents an XML keyword |
3638 |
|
|
prepended by a <CHAR::NUMBER SIGN>. |
3639 |
|
|
|
3640 |
|
|
@CAttr: |
3641 |
|
|
@@Name: dtdText |
3642 |
|
|
@@Type: DOMString |
3643 |
|
|
@@Get: |
3644 |
|
|
@@@PerlDef: |
3645 |
|
|
$r = '#'.$self->SUPER::dtd_text; |
3646 |
|
|
##XDPRNIKeywordElement |
3647 |
|
|
|
3648 |
|
|
IFClsETDef: |
3649 |
|
|
@IFQName: XDPEntityValueElement |
3650 |
|
|
@ETQName: xdp|entity-value |
3651 |
|
|
@ClsQName: ManakaiDOMXDPEntityValueElement |
3652 |
|
|
|
3653 |
|
|
@IFISA: XDPElement |
3654 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3655 |
|
|
|
3656 |
|
|
@enDesc: |
3657 |
|
|
An <XE::xdp|entity-value> element represents an XML entity |
3658 |
|
|
value. |
3659 |
|
|
|
3660 |
|
|
@CAttr: |
3661 |
|
|
@@Name: dtdText |
3662 |
|
|
@@Type: DOMString |
3663 |
|
|
@@Get: |
3664 |
|
|
@@@PerlDef: |
3665 |
|
|
require Message::DOM::Traversal; |
3666 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
3667 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
3668 |
|
|
my $tw = $doctrv->create_tree_walker |
3669 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
3670 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
3671 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
3672 |
|
|
sub { |
3673 |
|
|
my $node = $_[1]; |
3674 |
|
|
if ($node-><AG::Node.nodeType> |
3675 |
|
|
== <C::Node.ELEMENT_NODE>) { |
3676 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
3677 |
|
|
if (not defined $ns) { |
3678 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3679 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
3680 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3681 |
|
|
} else { |
3682 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3683 |
|
|
} |
3684 |
|
|
} else { |
3685 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3686 |
|
|
} |
3687 |
|
|
}, true); |
3688 |
|
|
my $current = $tw->first_child; |
3689 |
|
|
$r = ''; |
3690 |
|
|
C: while (defined $current) { |
3691 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
3692 |
|
|
if ({ |
3693 |
|
|
<Q::xdp|peref> => true, |
3694 |
|
|
}->{$current->manakai_expanded_uri}) { |
3695 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
3696 |
|
|
} else { |
3697 |
|
|
my $v = $current-><AG::XDPElement.dtdText>; |
3698 |
|
|
$v =~ s/&/&/g; |
3699 |
|
|
$v =~ s/%/%/g; |
3700 |
|
|
$r .= $v; |
3701 |
|
|
} |
3702 |
|
|
} else { |
3703 |
|
|
my $v = $current-><AG::Node.textContent>; |
3704 |
|
|
$v =~ s/&/&/g; |
3705 |
|
|
$v =~ s/%/%/g; |
3706 |
|
|
$r .= $v; |
3707 |
|
|
} |
3708 |
|
|
|
3709 |
|
|
$current = $tw->next_sibling; |
3710 |
|
|
} # C |
3711 |
|
|
|
3712 |
|
|
if ($r =~ /"/) { |
3713 |
|
|
$r =~ s/'/'/g; |
3714 |
|
|
$r = "'".$r."'"; |
3715 |
|
|
} else { |
3716 |
|
|
$r =~ s/"/"/g; |
3717 |
|
|
$r = '"'.$r.'"'; |
3718 |
|
|
} |
3719 |
|
|
##XDPEntityValueElement |
3720 |
|
|
|
3721 |
|
|
IFClsETDef: |
3722 |
|
|
@IFQName: XDPAttrLiteralElement |
3723 |
|
|
@ETQName: xdp|attr-literal |
3724 |
|
|
@ClsQName: ManakaiDOMXDPAttrLiteralElement |
3725 |
|
|
|
3726 |
|
|
@IFISA: XDPElement |
3727 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3728 |
|
|
|
3729 |
|
|
@enDesc: |
3730 |
|
|
An <XE::xdp|attr-literal> element represents an XML attribute |
3731 |
|
|
value literal. |
3732 |
|
|
|
3733 |
|
|
@CAttr: |
3734 |
|
|
@@Name: dtdText |
3735 |
|
|
@@Type: DOMString |
3736 |
|
|
@@Get: |
3737 |
|
|
@@@PerlDef: |
3738 |
|
|
require Message::DOM::Traversal; |
3739 |
|
|
my $doctrv = $self-><AG::Node.ownerDocument> |
3740 |
|
|
-><M::Node.getFeature> (Traversal => '2.0'); |
3741 |
|
|
my $tw = $doctrv->create_tree_walker |
3742 |
|
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
3743 |
|
|
<C::NodeFilter.SHOW_TEXT> | |
3744 |
|
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
3745 |
|
|
sub { |
3746 |
|
|
my $node = $_[1]; |
3747 |
|
|
if ($node-><AG::Node.nodeType> |
3748 |
|
|
== <C::Node.ELEMENT_NODE>) { |
3749 |
|
|
my $ns = $node-><AG::Node.namespaceURI>; |
3750 |
|
|
if (not defined $ns) { |
3751 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3752 |
|
|
} elsif ($ns eq <Q::xdp|>) { |
3753 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3754 |
|
|
} else { |
3755 |
|
|
return <C::NodeFilter.FILTER_REJECT>; |
3756 |
|
|
} |
3757 |
|
|
} else { |
3758 |
|
|
return <C::NodeFilter.FILTER_ACCEPT>; |
3759 |
|
|
} |
3760 |
|
|
}, true); |
3761 |
|
|
my $current = $tw->first_child; |
3762 |
|
|
$r = ''; |
3763 |
|
|
C: while (defined $current) { |
3764 |
|
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
3765 |
|
|
if ({ |
3766 |
|
|
<Q::xdp|geref> => true, |
3767 |
|
|
<Q::xdp|ncr> => true, |
3768 |
|
|
<Q::xdp|hcr> => true, |
3769 |
|
|
}->{$current->manakai_expanded_uri}) { |
3770 |
|
|
$r .= $current-><AG::XDPElement.dtdText>; |
3771 |
|
|
} else { |
3772 |
|
|
my $v = $current-><AG::XDPElement.dtdText>; |
3773 |
|
|
$v =~ s/&/&/g; |
3774 |
|
|
$r .= $v; |
3775 |
|
|
} |
3776 |
|
|
} else { |
3777 |
|
|
my $v = $current-><AG::Node.textContent>; |
3778 |
|
|
$v =~ s/&/&/g; |
3779 |
|
|
$r .= $v; |
3780 |
|
|
} |
3781 |
|
|
|
3782 |
|
|
$current = $tw->next_sibling; |
3783 |
|
|
} # C |
3784 |
|
|
|
3785 |
|
|
if ($r =~ /"/) { |
3786 |
|
|
$r =~ s/'/'/g; |
3787 |
|
|
$r = "'".$r."'"; |
3788 |
|
|
} else { |
3789 |
|
|
$r =~ s/"/"/g; |
3790 |
|
|
$r = '"'.$r.'"'; |
3791 |
|
|
} |
3792 |
|
|
##XDPPAttrLiteralElement |
3793 |
|
|
|
3794 |
|
|
IFClsETDef: |
3795 |
|
|
@IFQName: XDPMinimumLiteralElement |
3796 |
|
|
@ETQName: xdp|minimum-literal |
3797 |
|
|
@ClsQName: ManakaiDOMXDPMinimumLiteralElement |
3798 |
|
|
|
3799 |
|
|
@IFISA: XDPElement |
3800 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3801 |
|
|
|
3802 |
|
|
@enDesc: |
3803 |
|
|
An <XE::xdp|minimum-literal> element represents an XML public identifier |
3804 |
|
|
literal. |
3805 |
|
|
|
3806 |
|
|
@CAttr: |
3807 |
|
|
@@Name: dtdText |
3808 |
|
|
@@Type: DOMString |
3809 |
|
|
@@Get: |
3810 |
|
|
@@@PerlDef: |
3811 |
|
|
$r = $self->SUPER::dtd_text; |
3812 |
|
|
$r =~ s/"/%22/g; |
3813 |
|
|
$r = '"'.$r.'"'; |
3814 |
|
|
##XDPMinimumLiteralElement |
3815 |
|
|
|
3816 |
|
|
IFClsETDef: |
3817 |
|
|
@IFQName: XDPSystemLiteralElement |
3818 |
|
|
@ETQName: xdp|system-literal |
3819 |
|
|
@ClsQName: ManakaiDOMXDPSystemLiteralElement |
3820 |
|
|
|
3821 |
|
|
@IFISA: XDPElement |
3822 |
|
|
@ClsISA: ManakaiDOMXDPElement |
3823 |
|
|
|
3824 |
|
|
@enDesc: |
3825 |
|
|
An <XE::xdp|system-literal> element represents an XML system |
3826 |
|
|
literal. |
3827 |
|
|
|
3828 |
|
|
@CAttr: |
3829 |
|
|
@@Name: dtdText |
3830 |
|
|
@@Type: DOMString |
3831 |
|
|
@@Get: |
3832 |
|
|
@@@PerlDef: |
3833 |
|
|
$r = $self->SUPER::dtd_text; |
3834 |
|
|
$r =~ s/"/%22/g; |
3835 |
|
|
$r = '"'.$r.'"'; |
3836 |
|
|
##XDPSystemLiteralElement |