1 |
wakaba |
1.1 |
Module: |
2 |
|
|
@QName: Markup|Atom |
3 |
|
|
@enFN: |
4 |
|
|
Atom DOM |
5 |
|
|
@enDesc: |
6 |
|
|
The <DFN::Atom DOM> is a language and platform independent |
7 |
|
|
programming language interface to Atom 1.0 documents |
8 |
|
|
built on the W3C Document Object Model (DOM). It defines |
9 |
|
|
a number of interfaces that provide convenience |
10 |
|
|
methods and attributes to process Atom 1.0 documents. |
11 |
|
|
|
12 |
|
|
{TODO:: |
13 |
|
|
- Move descriptions below to somewhere. |
14 |
|
|
|
15 |
|
|
- Formal definition for <IF::StaticNodeList> (reference |
16 |
|
|
to Selectors API?) is necessary. |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
Some attributes are defined to contain a <IF::StaticNodeList>. |
20 |
|
|
Multiple invocations for such an attribute don't have |
21 |
|
|
to return exactly same object, even if no changes are made |
22 |
|
|
on the underlying DOM structure. |
23 |
|
|
|
24 |
|
|
{NOTE:: |
25 |
|
|
The equality of <IF::StaticNodeList> objects as per |
26 |
|
|
the <M::Node.isEqualNode> method, however, is |
27 |
|
|
preserved as long as the underlying DOM structure |
28 |
|
|
and the configuration parameters are not changed. |
29 |
|
|
} |
30 |
|
|
|
31 |
|
|
Methods and attributes defined in this module does <EM::not> |
32 |
|
|
support <IF::tx|EntityReference>s; for example, an element |
33 |
|
|
node that is a child node of an entity reference node |
34 |
|
|
that is a child node of another element node is <EM::not> considered |
35 |
|
|
as a child element node of the other element node. As a |
36 |
|
|
result, applications written using this module might ignore |
37 |
|
|
parts of Atom documents unless they configures their XML |
38 |
|
|
parser not to expose entity references in the result DOM tree. |
39 |
|
|
|
40 |
|
|
@Namespace: |
41 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup/Atom/ |
42 |
|
|
|
43 |
|
|
@DISCore:author: DISCore|Wakaba |
44 |
|
|
@License: license|Perl+MPL |
45 |
|
|
@Date: |
46 |
wakaba |
1.13 |
$Date: 2006/09/07 07:25:29 $ |
47 |
wakaba |
1.1 |
|
48 |
|
|
@Require: |
49 |
|
|
@@Module: |
50 |
|
|
@@@QName: Markup|common |
51 |
|
|
@@Module: |
52 |
|
|
@@@QName: MDOM|TreeCore |
53 |
|
|
@@@WithFor: ManakaiDOM|ManakaiDOMLatest |
54 |
|
|
@@Module: |
55 |
|
|
@@@WithFor: ManakaiDOM|ManakaiDOM |
56 |
|
|
@@Module: |
57 |
|
|
@@@WithFor: ManakaiDOM|ManakaiDOMLatest |
58 |
wakaba |
1.11 |
@@Module: |
59 |
|
|
@@@QName: DISlib|DISMarkup |
60 |
|
|
@@@WithFor: ManakaiDOM|all |
61 |
wakaba |
1.1 |
@DefaultFor: ManakaiDOM|ManakaiDOMLatest |
62 |
|
|
|
63 |
|
|
Namespace: |
64 |
|
|
@atom: |
65 |
|
|
http://www.w3.org/2005/Atom |
66 |
|
|
@c: |
67 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core# |
68 |
|
|
@cfg: |
69 |
|
|
http://suika.fam.cx/www/2006/dom-config/ |
70 |
wakaba |
1.11 |
@DISlib: |
71 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/ |
72 |
wakaba |
1.1 |
@dis: |
73 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis-- |
74 |
wakaba |
1.4 |
@dlp: |
75 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Perl# |
76 |
wakaba |
1.1 |
@d: |
77 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/xdt# |
78 |
|
|
@DOMMain: |
79 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/main# |
80 |
|
|
@dx: |
81 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException# |
82 |
wakaba |
1.9 |
@dxm: |
83 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/XML# |
84 |
wakaba |
1.1 |
@ecore: |
85 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/Core/ |
86 |
|
|
@f: |
87 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dom/feature# |
88 |
|
|
@fe: |
89 |
|
|
http://suika.fam.cx/www/2006/feature/ |
90 |
|
|
@html: |
91 |
|
|
http://www.w3.org/1999/xhtml |
92 |
|
|
@idl: |
93 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/IDL# |
94 |
|
|
@kwd: |
95 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/rfc2119/ |
96 |
|
|
@lang: |
97 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang# |
98 |
|
|
@license: |
99 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/license# |
100 |
|
|
@ManakaiDOM: |
101 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom# |
102 |
|
|
@Markup: |
103 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup# |
104 |
|
|
@MDOM: |
105 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM. |
106 |
|
|
@MDOMX: |
107 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception# |
108 |
wakaba |
1.4 |
@mv: |
109 |
|
|
http://suika.fam.cx/www/2006/05/mv/ |
110 |
wakaba |
1.1 |
@rel: |
111 |
|
|
http://www.iana.org/assignments/relation/ |
112 |
|
|
@s: |
113 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Markup# |
114 |
|
|
@tc: |
115 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/ |
116 |
|
|
@td: |
117 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Document/ |
118 |
|
|
@te: |
119 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/ |
120 |
|
|
@test: |
121 |
|
|
http://suika.fam.cx/~wakaba/archive/2004/dis/Test# |
122 |
|
|
@tx: |
123 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/ |
124 |
|
|
@urigen: |
125 |
|
|
http://suika.fam.cx/~wakaba/archive/2005/manakai/URI/Generic/ |
126 |
|
|
@xml: |
127 |
|
|
http://www.w3.org/XML/1998/namespace |
128 |
|
|
|
129 |
|
|
ElementTypeBinding: |
130 |
|
|
@Name: CODE |
131 |
|
|
@ElementType: |
132 |
|
|
dis:ResourceDef |
133 |
|
|
@ShadowContent: |
134 |
|
|
@@DISCore:resourceType: dlp|BlockCode |
135 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
136 |
|
|
|
137 |
|
|
ElementTypeBinding: |
138 |
|
|
@Name: Method |
139 |
|
|
@ElementType: |
140 |
|
|
dis:ResourceDef |
141 |
|
|
@ShadowContent: |
142 |
|
|
@@DISCore:resourceType: DISLang|Method |
143 |
|
|
@@ForCheck: !=ManakaiDOM|ManakaiDOM |
144 |
|
|
|
145 |
|
|
ElementTypeBinding: |
146 |
|
|
@Name: Param |
147 |
|
|
@ElementType: |
148 |
|
|
dis:ResourceDef |
149 |
|
|
@ShadowContent: |
150 |
|
|
@@DISCore:resourceType: DISLang|MethodParameter |
151 |
|
|
|
152 |
|
|
ElementTypeBinding: |
153 |
|
|
@Name: Return |
154 |
|
|
@ElementType: |
155 |
|
|
dis:ResourceDef |
156 |
|
|
@ShadowContent: |
157 |
|
|
@@DISCore:resourceType: DISLang|MethodReturn |
158 |
|
|
|
159 |
|
|
ElementTypeBinding: |
160 |
|
|
@Name: Attr |
161 |
|
|
@ElementType: |
162 |
|
|
dis:ResourceDef |
163 |
|
|
@ShadowContent: |
164 |
|
|
@@DISCore:resourceType: DISLang|Attribute |
165 |
|
|
@@ForCheck: !=ManakaiDOM|ManakaiDOM |
166 |
|
|
|
167 |
|
|
ElementTypeBinding: |
168 |
wakaba |
1.6 |
@Name: ATTR |
169 |
|
|
@ElementType: |
170 |
|
|
dis:ResourceDef |
171 |
|
|
@ShadowContent: |
172 |
|
|
@@DISCore:resourceType: |
173 |
|
|
@@@@: DISLang|Attribute |
174 |
|
|
@@@ForCheck: ManakaiDOM|ForIF |
175 |
|
|
@@DISCore:resourceType: |
176 |
|
|
@@@@: DISLang|Attribute |
177 |
|
|
@@@ForCheck: ManakaiDOM|ForClass |
178 |
|
|
@@DISCore:resourceType: |
179 |
wakaba |
1.7 |
@@@@: mv|AttributeType |
180 |
wakaba |
1.6 |
@@@ForCheck: s|ForML |
181 |
|
|
@@ForCheck: !=ManakaiDOM|ManakaiDOM |
182 |
|
|
|
183 |
|
|
ElementTypeBinding: |
184 |
wakaba |
1.1 |
@Name: Get |
185 |
|
|
@ElementType: |
186 |
|
|
dis:ResourceDef |
187 |
|
|
@ShadowContent: |
188 |
|
|
@@DISCore:resourceType: DISLang|AttributeGet |
189 |
|
|
|
190 |
|
|
ElementTypeBinding: |
191 |
|
|
@Name: Set |
192 |
|
|
@ElementType: |
193 |
|
|
dis:ResourceDef |
194 |
|
|
@ShadowContent: |
195 |
|
|
@@DISCore:resourceType: DISLang|AttributeSet |
196 |
|
|
|
197 |
|
|
ElementTypeBinding: |
198 |
|
|
@Name: nullCase |
199 |
|
|
@ElementType: |
200 |
|
|
dis:ResourceDef |
201 |
|
|
@ShadowContent: |
202 |
|
|
@@DISCore:resourceType: ManakaiDOM|InCase |
203 |
|
|
@@Value: |
204 |
|
|
@@@is-null:1 |
205 |
|
|
|
206 |
|
|
ElementTypeBinding: |
207 |
|
|
@Name: PerlDef |
208 |
|
|
@ElementType: |
209 |
|
|
dis:Def |
210 |
|
|
@ShadowContent: |
211 |
|
|
@@ContentType: lang|Perl |
212 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
213 |
|
|
|
214 |
|
|
ElementTypeBinding: |
215 |
|
|
@Name: PerlCDef |
216 |
|
|
@ElementType: |
217 |
|
|
dis:Def |
218 |
|
|
@ShadowContent: |
219 |
|
|
@@ContentType: lang|Perl |
220 |
|
|
|
221 |
|
|
ElementTypeBinding: |
222 |
|
|
@Name: enImplNote |
223 |
|
|
@ElementType: |
224 |
|
|
dis:ImplNote |
225 |
|
|
@ShadowContent: |
226 |
|
|
@@lang:en |
227 |
|
|
|
228 |
|
|
ElementTypeBinding: |
229 |
|
|
@Name: enFN |
230 |
|
|
@ElementType: |
231 |
|
|
dis:FullName |
232 |
|
|
@ShadowContent: |
233 |
|
|
@@lang:en |
234 |
|
|
|
235 |
|
|
ElementTypeBinding: |
236 |
|
|
@Name: IFClsETDef |
237 |
|
|
@ElementType: |
238 |
|
|
dis:ResourceDef |
239 |
|
|
@ShadowContent: |
240 |
|
|
@@DISCore:resourceType: |
241 |
|
|
@@@@: dis|MultipleResource |
242 |
|
|
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
243 |
|
|
@@resourceFor: ManakaiDOM|ForIF |
244 |
|
|
@@resourceFor: ManakaiDOM|ForClass |
245 |
|
|
@@resourceFor: s|ForML |
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 |
|
|
@@s:elementType: |
265 |
|
|
@@@@: ||+||s|ForML |
266 |
|
|
@@@ContentType: DISCore|TFPQNames |
267 |
|
|
@@@DISCore:stopISARecursive:1 |
268 |
|
|
|
269 |
|
|
@@DISCore:resourceType: |
270 |
|
|
@@@@: s|ElementType |
271 |
|
|
@@@ForCheck: s|ForML |
272 |
|
|
|
273 |
|
|
@@f:implements: AtomFeature10 |
274 |
|
|
|
275 |
|
|
ElementTypeBinding: |
276 |
|
|
@Name: IFClsDef |
277 |
|
|
@ElementType: |
278 |
|
|
dis:ResourceDef |
279 |
|
|
@ShadowContent: |
280 |
|
|
@@DISCore:resourceType: |
281 |
|
|
@@@@: dis|MultipleResource |
282 |
|
|
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
283 |
|
|
@@resourceFor: ManakaiDOM|ForIF |
284 |
|
|
@@resourceFor: ManakaiDOM|ForClass |
285 |
|
|
@@For: ManakaiDOM|ManakaiDOM |
286 |
|
|
|
287 |
|
|
@@DISCore:resourceType: |
288 |
|
|
@@@@: DISLang|Interface |
289 |
|
|
@@@ForCheck: ManakaiDOM|ForIF |
290 |
|
|
|
291 |
|
|
@@DISCore:resourceType: |
292 |
|
|
@@@@: DISLang|Class |
293 |
|
|
@@@ForCheck: ManakaiDOM|ForClass |
294 |
|
|
@@Implement: |
295 |
|
|
@@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF |
296 |
|
|
@@@ContentType: DISCore|TFPQNames |
297 |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM |
298 |
|
|
@@Implement: |
299 |
|
|
@@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF |
300 |
|
|
@@@ContentType: DISCore|TFPQNames |
301 |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest |
302 |
|
|
|
303 |
|
|
@@f:implements: AtomFeature10 |
304 |
|
|
|
305 |
|
|
ElementTypeBinding: |
306 |
wakaba |
1.6 |
@Name: IFClsConstructDef |
307 |
|
|
@ElementType: |
308 |
|
|
dis:ResourceDef |
309 |
|
|
@ShadowContent: |
310 |
|
|
@@DISCore:resourceType: |
311 |
|
|
@@@@: dis|MultipleResource |
312 |
wakaba |
1.7 |
@@@ForCheck: |
313 |
|
|
!ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML !mv|ForCM !mv|ForAG |
314 |
wakaba |
1.6 |
@@resourceFor: ManakaiDOM|ForIF |
315 |
|
|
@@resourceFor: ManakaiDOM|ForClass |
316 |
|
|
@@resourceFor: mv|ForCM |
317 |
|
|
@@resourceFor: mv|ForAG |
318 |
|
|
@@For: ManakaiDOM|ManakaiDOM |
319 |
|
|
|
320 |
|
|
@@DISCore:resourceType: |
321 |
|
|
@@@@: DISLang|Interface |
322 |
|
|
@@@ForCheck: ManakaiDOM|ForIF |
323 |
|
|
|
324 |
|
|
@@DISCore:resourceType: |
325 |
|
|
@@@@: DISLang|Class |
326 |
|
|
@@@ForCheck: ManakaiDOM|ForClass |
327 |
|
|
@@Implement: |
328 |
|
|
@@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF |
329 |
|
|
@@@ContentType: DISCore|TFPQNames |
330 |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM |
331 |
|
|
@@Implement: |
332 |
|
|
@@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF |
333 |
|
|
@@@ContentType: DISCore|TFPQNames |
334 |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest |
335 |
|
|
|
336 |
|
|
@@DISCore:resourceType: |
337 |
|
|
@@@@: mv|AttributeTypeGroup |
338 |
|
|
@@@ForCheck: mv|ForAG |
339 |
|
|
|
340 |
|
|
@@DISCore:resourceType: |
341 |
|
|
@@@@: mv|ElementContentModel |
342 |
|
|
@@@ForCheck: mv|ForCM |
343 |
|
|
|
344 |
|
|
@@f:implements: AtomFeature10 |
345 |
|
|
|
346 |
|
|
ElementTypeBinding: |
347 |
wakaba |
1.1 |
@Name: IFQName |
348 |
|
|
@ElementType: |
349 |
|
|
dis:QName |
350 |
|
|
@ShadowContent: |
351 |
|
|
@@ForCheck: ManakaiDOM|ForIF |
352 |
|
|
|
353 |
|
|
ElementTypeBinding: |
354 |
|
|
@Name: ClsQName |
355 |
|
|
@ElementType: |
356 |
|
|
dis:QName |
357 |
|
|
@ShadowContent: |
358 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
359 |
|
|
|
360 |
|
|
ElementTypeBinding: |
361 |
|
|
@Name: ETRQName |
362 |
|
|
@ElementType: |
363 |
|
|
dis:QName |
364 |
|
|
@ShadowContent: |
365 |
|
|
@@ForCheck: s|ForML |
366 |
|
|
|
367 |
|
|
ElementTypeBinding: |
368 |
|
|
@Name: ETQName |
369 |
|
|
@ElementType: |
370 |
|
|
dis:AppName |
371 |
|
|
@ShadowContent: |
372 |
|
|
@@ForCheck: s|ForML |
373 |
|
|
@@ContentType: DISCore|QName |
374 |
|
|
|
375 |
|
|
ElementTypeBinding: |
376 |
wakaba |
1.6 |
@Name: CMQName |
377 |
|
|
@ElementType: |
378 |
|
|
dis:QName |
379 |
|
|
@ShadowContent: |
380 |
|
|
@@ForCheck: mv|ForCM |
381 |
|
|
|
382 |
|
|
ElementTypeBinding: |
383 |
|
|
@Name: CMName |
384 |
|
|
@ElementType: |
385 |
|
|
mv:elementContentModelName |
386 |
|
|
@ShadowContent: |
387 |
|
|
@@ForCheck: mv|ForCM |
388 |
|
|
|
389 |
|
|
ElementTypeBinding: |
390 |
|
|
@Name: AGQName |
391 |
|
|
@ElementType: |
392 |
|
|
dis:QName |
393 |
|
|
@ShadowContent: |
394 |
|
|
@@ForCheck: mv|ForAG |
395 |
|
|
|
396 |
|
|
ElementTypeBinding: |
397 |
|
|
@Name: AGName |
398 |
|
|
@ElementType: |
399 |
|
|
mv:attributeTypeGroupName |
400 |
|
|
@ShadowContent: |
401 |
|
|
@@ForCheck: mv|ForAG |
402 |
|
|
|
403 |
|
|
ElementTypeBinding: |
404 |
wakaba |
1.1 |
@Name: IFISA |
405 |
|
|
@ElementType: |
406 |
|
|
dis:ISA |
407 |
|
|
@ShadowContent: |
408 |
|
|
@@ForCheck: ManakaiDOM|ForIF |
409 |
|
|
|
410 |
|
|
ElementTypeBinding: |
411 |
|
|
@Name: ClsISA |
412 |
|
|
@ElementType: |
413 |
|
|
dis:ISA |
414 |
|
|
@ShadowContent: |
415 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
416 |
|
|
|
417 |
|
|
ElementTypeBinding: |
418 |
|
|
@Name: disDef |
419 |
|
|
@ElementType: |
420 |
|
|
dis:Def |
421 |
|
|
@ShadowContent: |
422 |
|
|
@@ContentType: |
423 |
|
|
lang:dis |
424 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
425 |
|
|
|
426 |
|
|
ElementTypeBinding: |
427 |
|
|
@Name: Code |
428 |
|
|
@ElementType: |
429 |
|
|
dis:ResourceDef |
430 |
|
|
@ShadowContent: |
431 |
|
|
@@DISCore:resourceType: dlp|InlineCode |
432 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
433 |
|
|
|
434 |
|
|
ElementTypeBinding: |
435 |
|
|
@Name: Test |
436 |
|
|
@ElementType: |
437 |
|
|
dis:ResourceDef |
438 |
|
|
@ShadowContent: |
439 |
|
|
@@DISCore:resourceType: test|StandaloneTest |
440 |
|
|
@@ForCheck: ManakaiDOM|ForClass |
441 |
|
|
|
442 |
|
|
ElementTypeBinding: |
443 |
|
|
@Name: TestC |
444 |
|
|
@ElementType: |
445 |
|
|
dis:ResourceDef |
446 |
|
|
@ShadowContent: |
447 |
|
|
@@DISCore:resourceType: test|StandaloneTest |
448 |
|
|
|
449 |
|
|
ResourceDef: |
450 |
|
|
@QName: Document |
451 |
|
|
@AliasFor: td|Document |
452 |
|
|
@For: ManakaiDOM|DOM |
453 |
|
|
|
454 |
|
|
ResourceDef: |
455 |
|
|
@QName: Element |
456 |
|
|
@AliasFor: te|Element |
457 |
|
|
@For: ManakaiDOM|DOM |
458 |
|
|
|
459 |
|
|
ResourceDef: |
460 |
|
|
@QName: Attr |
461 |
|
|
@AliasFor: te|Attr |
462 |
|
|
@For: ManakaiDOM|DOM |
463 |
|
|
|
464 |
|
|
ResourceDef: |
465 |
|
|
@QName: DOMString |
466 |
|
|
@AliasFor: DOMMain|DOMString |
467 |
|
|
@For: ManakaiDOM|DOM |
468 |
|
|
|
469 |
|
|
ResourceDef: |
470 |
|
|
@QName: DOMURI |
471 |
|
|
@AliasFor: ManakaiDOM|ManakaiDOMURI |
472 |
|
|
@For: ManakaiDOM|DOM3 |
473 |
|
|
|
474 |
|
|
ResourceDef: |
475 |
|
|
@QName: DOMTimeStamp |
476 |
|
|
@AliasFor: DOMMain|DOMTimeStamp |
477 |
|
|
@For: ManakaiDOM|DOM2 |
478 |
|
|
|
479 |
|
|
ResourceDef: |
480 |
|
|
@QName: boolean |
481 |
|
|
@AliasFor: idl|boolean||ManakaiDOM|all |
482 |
|
|
|
483 |
|
|
ResourceDef: |
484 |
|
|
@QName: Node |
485 |
|
|
@AliasFor: tc|Node |
486 |
|
|
@For: ManakaiDOM|ManakaiDOM |
487 |
|
|
|
488 |
|
|
ResourceDef: |
489 |
|
|
@QName: NodeList |
490 |
|
|
@AliasFor: tc|NodeList |
491 |
|
|
@For: ManakaiDOM|ManakaiDOM |
492 |
|
|
|
493 |
|
|
ResourceDef: |
494 |
|
|
@QName: StaticNodeList |
495 |
|
|
@AliasFor: tc|StaticNodeList |
496 |
|
|
@For: ManakaiDOM|ManakaiDOM |
497 |
|
|
|
498 |
|
|
ElementTypeBinding: |
499 |
|
|
@Name: enDesc |
500 |
|
|
@ElementType: |
501 |
|
|
dis:Description |
502 |
|
|
@ShadowContent: |
503 |
|
|
@@lang:en |
504 |
|
|
|
505 |
|
|
ElementTypeBinding: |
506 |
wakaba |
1.4 |
@Name: enLN |
507 |
|
|
@ElementType: |
508 |
|
|
mv:longName |
509 |
|
|
@ShadowContent: |
510 |
|
|
@@lang:en |
511 |
|
|
|
512 |
|
|
ElementTypeBinding: |
513 |
wakaba |
1.1 |
@Name: TrueCase |
514 |
|
|
@ElementType: |
515 |
|
|
dis:ResourceDef |
516 |
|
|
@ShadowContent: |
517 |
|
|
@@DISCore:resourceType: |
518 |
|
|
ManakaiDOM:InCase |
519 |
|
|
@@Value: |
520 |
|
|
@@@@: 1 |
521 |
|
|
@@@ContentType: DISCore|Boolean |
522 |
|
|
@@Type: idl|boolean||ManakaiDOM|all |
523 |
|
|
|
524 |
|
|
ElementTypeBinding: |
525 |
|
|
@Name: FalseCase |
526 |
|
|
@ElementType: |
527 |
|
|
dis:ResourceDef |
528 |
|
|
@ShadowContent: |
529 |
|
|
@@DISCore:resourceType: |
530 |
|
|
ManakaiDOM:InCase |
531 |
|
|
@@Value: |
532 |
|
|
@@@@: 0 |
533 |
|
|
@@@ContentType: DISCore|Boolean |
534 |
|
|
@@Type: idl|boolean||ManakaiDOM|all |
535 |
|
|
|
536 |
|
|
## -- Features |
537 |
|
|
|
538 |
|
|
ElementTypeBinding: |
539 |
|
|
@Name: FeatureDef |
540 |
|
|
@ElementType: |
541 |
|
|
dis:ResourceDef |
542 |
|
|
@ShadowContent: |
543 |
|
|
@@DISCore:resourceType: f|Feature |
544 |
|
|
@@For: =ManakaiDOM|all |
545 |
|
|
|
546 |
|
|
ElementTypeBinding: |
547 |
|
|
@Name: FeatureVerDef |
548 |
|
|
@ElementType: |
549 |
|
|
dis:ResourceDef |
550 |
|
|
@ShadowContent: |
551 |
|
|
@@DISCore:resourceType: f|Feature |
552 |
|
|
|
553 |
|
|
ElementTypeBinding: |
554 |
|
|
@Name: featureQName |
555 |
|
|
@ElementType: |
556 |
|
|
f:name |
557 |
|
|
@ShadowContent: |
558 |
|
|
@@ContentType: DISCore|QName |
559 |
|
|
|
560 |
|
|
FeatureDef: |
561 |
|
|
@featureQName: fe|Atom |
562 |
|
|
@QName: AtomFeature |
563 |
|
|
@FeatureVerDef: |
564 |
|
|
@@QName: AtomFeature10 |
565 |
|
|
@@Version: 1.0 |
566 |
|
|
@@f:instanceOf: AtomFeature |
567 |
|
|
@@f:requires: tx|XMLFeature30 |
568 |
|
|
@@enDesc: |
569 |
|
|
The Atom DOM, version 1.0. |
570 |
wakaba |
1.4 |
|
571 |
|
|
## -- Modules |
572 |
|
|
|
573 |
|
|
ModuleSetDef: |
574 |
|
|
@QName: Atom |
575 |
|
|
@enLN: Atom |
576 |
|
|
@mv:version: 1.0 |
577 |
wakaba |
1.7 |
@mv:contains: AtomDatatypes |
578 |
|
|
@mv:contains: AtomProperties |
579 |
|
|
@mv:contains: AtomEntry |
580 |
wakaba |
1.4 |
@mv:contains: AtomFeed |
581 |
wakaba |
1.10 |
@mv:contains: AtomQName |
582 |
|
|
|
583 |
wakaba |
1.11 |
@mv:targetNamespace: atom| |
584 |
|
|
@mv:defaultNamespacePrefix: atom |
585 |
wakaba |
1.13 |
@mv:systemIdentifierBaseURI: \ |
586 |
wakaba |
1.4 |
|
587 |
|
|
ModuleDef: |
588 |
|
|
@QName: AtomFeed |
589 |
|
|
@mv:id: feed |
590 |
|
|
@enLN: Feed |
591 |
wakaba |
1.8 |
@mv:contains: feed-prop |
592 |
wakaba |
1.4 |
@mv:contains: atom|feed |
593 |
|
|
|
594 |
|
|
ModuleDef: |
595 |
|
|
@QName: AtomEntry |
596 |
|
|
@mv:id: entry |
597 |
|
|
@enLN: Entry |
598 |
wakaba |
1.8 |
@mv:contains: entry-prop |
599 |
wakaba |
1.4 |
@mv:contains: atom|entry |
600 |
|
|
|
601 |
|
|
ModuleDef: |
602 |
wakaba |
1.6 |
@QName: AtomProperties |
603 |
|
|
@mv:id: props |
604 |
|
|
@enLN: Properties |
605 |
wakaba |
1.4 |
@mv:contains: atom|content |
606 |
wakaba |
1.8 |
@mv:contains: atom|contributor |
607 |
wakaba |
1.4 |
@mv:contains: atom|category |
608 |
|
|
@mv:contains: atom|generator |
609 |
|
|
@mv:contains: atom|link |
610 |
|
|
@mv:contains: atom|author |
611 |
|
|
@mv:contains: atom|published |
612 |
|
|
@mv:contains: atom|updated |
613 |
wakaba |
1.8 |
@mv:contains: atom|icon |
614 |
wakaba |
1.4 |
@mv:contains: atom|id |
615 |
wakaba |
1.8 |
@mv:contains: atom|logo |
616 |
|
|
@mv:contains: atom|rights |
617 |
|
|
@mv:contains: atom|subtitle |
618 |
|
|
@mv:contains: atom|summary |
619 |
wakaba |
1.4 |
@mv:contains: atom|title |
620 |
wakaba |
1.8 |
@mv:contains: source-prop |
621 |
|
|
@mv:contains: atom|source |
622 |
wakaba |
1.6 |
|
623 |
|
|
ModuleDef: |
624 |
|
|
@QName: AtomDatatypes |
625 |
|
|
@mv:id: datatypes |
626 |
|
|
@enLN: Datatypes |
627 |
wakaba |
1.7 |
|
628 |
|
|
@mv:contains: atomNCName |
629 |
|
|
@mv:contains: atomMediaType |
630 |
|
|
@mv:contains: atomLanguageTag |
631 |
|
|
@mv:contains: atomUri |
632 |
wakaba |
1.9 |
@mv:contains: atomUriCM |
633 |
wakaba |
1.7 |
@mv:contains: atomEmailAddress |
634 |
wakaba |
1.9 |
@mv:contains: atomEmailAddressCM |
635 |
wakaba |
1.7 |
|
636 |
wakaba |
1.8 |
@mv:contains: undefinedAttributes |
637 |
wakaba |
1.9 |
@mv:contains: undefinedContent |
638 |
wakaba |
1.7 |
@mv:contains: atomCommonAttributes |
639 |
|
|
|
640 |
wakaba |
1.8 |
@mv:contains: simpleExtensionElements |
641 |
|
|
@mv:contains: structuredExtensionElements |
642 |
|
|
@mv:contains: extensionElements |
643 |
|
|
|
644 |
wakaba |
1.6 |
@mv:contains: TextAG |
645 |
|
|
@mv:contains: TextCM |
646 |
wakaba |
1.8 |
|
647 |
|
|
@mv:contains: atom|name |
648 |
|
|
@mv:contains: atom|email |
649 |
|
|
@mv:contains: atom|uri |
650 |
wakaba |
1.6 |
@mv:contains: PersonAG |
651 |
wakaba |
1.8 |
@mv:contains: person-prop |
652 |
wakaba |
1.6 |
@mv:contains: PersonCM |
653 |
wakaba |
1.8 |
|
654 |
wakaba |
1.6 |
@mv:contains: DateAG |
655 |
|
|
@mv:contains: DateCM |
656 |
wakaba |
1.10 |
|
657 |
|
|
ResourceDef: |
658 |
|
|
@QName: AtomQName |
659 |
|
|
@enLN: Qualified Names |
660 |
|
|
@mv:id: qname |
661 |
|
|
@For: =ManakaiDOM|ManakaiDOMLatest |
662 |
|
|
@DISCore:resourceType: mv|XMLDTDQNameModule |
663 |
|
|
|
664 |
|
|
@mv:contains: Atom |
665 |
wakaba |
1.13 |
|
666 |
|
|
ResourceDef: |
667 |
|
|
@QName: Atom10 |
668 |
|
|
@enLN: Atom 1.0 |
669 |
|
|
@mv:id: atom10 |
670 |
|
|
@For: =ManakaiDOM|ManakaiDOMLatest |
671 |
|
|
@DISCore:resourceType: mv|XMLDTDDriver |
672 |
|
|
|
673 |
|
|
@mv:refers: Atom |
674 |
|
|
|
675 |
|
|
@mv:refers: AtomQName |
676 |
|
|
@mv:refers: AtomDatatypes |
677 |
|
|
@mv:refers: AtomProperties |
678 |
|
|
@mv:refers: AtomEntry |
679 |
|
|
@mv:refers: AtomFeed |
680 |
wakaba |
1.4 |
|
681 |
|
|
ElementTypeBinding: |
682 |
|
|
@Name: ModuleSetDef |
683 |
|
|
@ElementType: |
684 |
|
|
dis:ResourceDef |
685 |
|
|
@ShadowContent: |
686 |
|
|
@@DISCore:resourceType: mv|XMLDTDModuleSet |
687 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
688 |
|
|
|
689 |
|
|
ElementTypeBinding: |
690 |
|
|
@Name: ModuleDef |
691 |
|
|
@ElementType: |
692 |
|
|
dis:ResourceDef |
693 |
|
|
@ShadowContent: |
694 |
|
|
@@DISCore:resourceType: mv|XMLDTDModule |
695 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
696 |
wakaba |
1.1 |
|
697 |
|
|
## -- Implementation |
698 |
|
|
|
699 |
|
|
IFClsDef: |
700 |
|
|
@IFQName: AtomImplementation |
701 |
|
|
@ClsQName: ManakaiAtomImplementation |
702 |
|
|
|
703 |
|
|
@IFISA: c|DOMImplementation |
704 |
|
|
@ClsISA: c|ManakaiDOMImplementation |
705 |
|
|
|
706 |
|
|
@enDesc: |
707 |
|
|
The <IF::AtomImplementation> interface provides convenience |
708 |
|
|
methods to create Atom documents. |
709 |
|
|
|
710 |
|
|
@f:provides: AtomFeature10 |
711 |
|
|
|
712 |
|
|
@Test: |
713 |
|
|
@@QName: AtomImplementation.interface.test |
714 |
|
|
@@PerlDef: |
715 |
|
|
for my $interface ( |
716 |
|
|
<IFName::AtomImplementation>, |
717 |
|
|
<IFName::AtomImplementation||ManakaiDOM|ManakaiDOM>, |
718 |
|
|
<IFName::c|DOMImplementation>, |
719 |
|
|
<IFName::urigen|URIImplementation>, |
720 |
|
|
<IFName::f|MinimumImplementation>, |
721 |
|
|
<IFName::f|GetFeature>, |
722 |
|
|
) { |
723 |
|
|
$test->id ($interface); |
724 |
|
|
$test->assert_true |
725 |
|
|
(<Class::ManakaiAtomImplementation>->isa ($interface)); |
726 |
|
|
} |
727 |
|
|
@Test: |
728 |
|
|
@@QName: ImplementationRegistry.AtomImplementation.1.test |
729 |
|
|
@@PerlDef: |
730 |
|
|
require Message::Markup::Atom; |
731 |
|
|
my $impl = $Message::DOM::ImplementationRegistry |
732 |
|
|
->get_implementation ({ |
733 |
|
|
<Q::fe|Atom> => '1.0', |
734 |
|
|
}); |
735 |
|
|
|
736 |
|
|
$test->assert_isa ($impl, <IFName::AtomImplementation>); |
737 |
|
|
@Test: |
738 |
|
|
@@QName: ImplementationRegistry.AtomImplementation.2.test |
739 |
|
|
@@PerlDef: |
740 |
|
|
require Message::Markup::Atom; |
741 |
|
|
my $impl = $Message::DOM::ImplementationRegistry |
742 |
|
|
->get_implementation ({ |
743 |
|
|
Core => '3.0', |
744 |
|
|
<Q::fe|Atom> => '1.0', |
745 |
|
|
}); |
746 |
|
|
|
747 |
|
|
$test->assert_isa ($impl, <IFName::AtomImplementation>); |
748 |
|
|
@Test: |
749 |
|
|
@@QName: ImplementationRegistry.AtomImplementation.3.test |
750 |
|
|
@@PerlDef: |
751 |
|
|
require Message::Markup::Atom; |
752 |
|
|
my $impl = $Message::DOM::ImplementationRegistry |
753 |
|
|
->get_implementation ({ |
754 |
|
|
XML => '3.0', |
755 |
|
|
<Q::fe|Atom> => '1.0', |
756 |
|
|
}); |
757 |
|
|
|
758 |
|
|
$test->assert_isa ($impl, <IFName::AtomImplementation>); |
759 |
|
|
|
760 |
|
|
@Method: |
761 |
|
|
@@Name: createAtomFeedDocument |
762 |
|
|
@@enDesc: |
763 |
|
|
Creates an Atom Feed Document object. |
764 |
|
|
@@Param: |
765 |
|
|
@@@Name: id |
766 |
|
|
@@@Type: DOMString |
767 |
|
|
@@@actualType: DOMURI |
768 |
|
|
@@@enDesc: |
769 |
|
|
The <XE::atom|id> of the feed. |
770 |
|
|
@@Param: |
771 |
|
|
@@@Name: title |
772 |
|
|
@@@Type: DOMString |
773 |
|
|
@@@enDesc: |
774 |
|
|
The <XE::atom|title> of the feed. |
775 |
|
|
@@@nullCase: |
776 |
|
|
@@@@enDesc: |
777 |
|
|
The implementation <kwd:MUST> treate <DOM::null> |
778 |
|
|
as if an empty string is specified. |
779 |
|
|
@@Param: |
780 |
|
|
@@@Name: lang |
781 |
|
|
@@@Type: DOMString |
782 |
|
|
@@@enDesc: |
783 |
|
|
The default natural language of the feed. |
784 |
|
|
@@@nullCase: |
785 |
|
|
@@@@enDesc: |
786 |
|
|
The implementation <kwd:MUST> treate <DOM::null> |
787 |
|
|
as if an empty string is specified. |
788 |
|
|
@@Return: |
789 |
|
|
@@@Type: AtomFeedDocument |
790 |
|
|
@@@enDesc: |
791 |
|
|
The newly created Atom Feed Document. |
792 |
|
|
|
793 |
|
|
{P:: The returned object <kwd:MUST> be a <IF::Document> node |
794 |
|
|
with attributes: |
795 |
|
|
|
796 |
|
|
- <A::Node.childNodes>::: A <IF::NodeList> containing |
797 |
|
|
a new <XE::atom|feed> element node. |
798 |
|
|
|
799 |
|
|
- <A::Document.xmlVersion>::: <XML::1.0>. |
800 |
|
|
|
801 |
|
|
} |
802 |
|
|
|
803 |
|
|
{P:: The newly created <XE::atom|feed> element node <kwd:MUST> |
804 |
|
|
have attributes set as: |
805 |
|
|
|
806 |
|
|
- <A::Node.attributes>::: A <IF::NamedNodeMap> that contains |
807 |
|
|
at least a new <XA::xml|lang> |
808 |
|
|
attribute node. |
809 |
|
|
|
810 |
|
|
- <A::Node.childNodes>::: A <IF::NodeList> containing |
811 |
|
|
a new <XE::atom|id> element node, |
812 |
|
|
a new <XE::atom|title> element node, and |
813 |
|
|
a new <XE::atom|updated> element node |
814 |
|
|
in any order. |
815 |
|
|
|
816 |
|
|
} |
817 |
|
|
|
818 |
|
|
{P:: The newly created <XA::xml|lang> attribute node <kwd:MUST> |
819 |
|
|
have attributes set as: |
820 |
|
|
|
821 |
|
|
- <A::Node.nodeValue>::: <P::lang>. |
822 |
|
|
|
823 |
|
|
- <A::Attr.specified>::: <DOM::true>. |
824 |
|
|
|
825 |
|
|
} |
826 |
|
|
|
827 |
|
|
{P:: The newly created <XE::atom|id> element node <kwd:MUST> |
828 |
|
|
have attributes set as: |
829 |
|
|
|
830 |
|
|
- <A::Node.textContent>::: <P::id>. |
831 |
|
|
|
832 |
|
|
} |
833 |
|
|
|
834 |
|
|
{P:: The newly created <XE::atom|title> element node <kwd:MUST> |
835 |
|
|
have attributes set as: |
836 |
|
|
|
837 |
|
|
- <A::Node.textContent>::: <P::title>. |
838 |
|
|
|
839 |
|
|
} |
840 |
|
|
|
841 |
|
|
The <XA::type> attribute node <kwd:MUST-NOT> be attached |
842 |
|
|
to the <XE::atom|title> element node. |
843 |
|
|
|
844 |
|
|
{P:: The newly created <XE::atom|updated> element node <kwd:MUST> |
845 |
|
|
have attributes set as: |
846 |
|
|
|
847 |
|
|
- <A::Node.textContent>::: A uppercase RFC 3339 <CODE::date-time> |
848 |
|
|
representation of the time when the method is invoked. |
849 |
|
|
The implementation <kwd:MAY> align its timezone to |
850 |
|
|
that of the environment in which the method is invoked. |
851 |
|
|
|
852 |
|
|
} |
853 |
|
|
@@@PerlDef: |
854 |
|
|
__DEEP{ |
855 |
|
|
$r = $self-><M::c|DOMImplementation.createDocument> |
856 |
|
|
(<Q::atom|>, 'feed'); |
857 |
|
|
$r-><AS::Document.xmlVersion> ('1.0'); |
858 |
|
|
|
859 |
|
|
my $feede = $r-><AG::Document.documentElement>; |
860 |
|
|
$feede-><AS::Node.manakaiLanguage> (defined $lang ? $lang : ''); |
861 |
|
|
|
862 |
|
|
$feede-><AS::AtomFeedElement.id> ($id); |
863 |
|
|
|
864 |
|
|
my $titlee = $r-><M::Document.createElementNS> (<Q::atom|>, 'title'); |
865 |
|
|
$titlee-><AS::Node.textContent> (defined $title ? $title : ''); |
866 |
|
|
$feede-><M::Node.appendChild> ($titlee); |
867 |
|
|
|
868 |
|
|
my $updatede = $r-><M::Document.createElementNS> |
869 |
|
|
(<Q::atom|>, 'updated'); |
870 |
|
|
$updatede-><AS::AtomDateConstruct.value> (scalar time); |
871 |
|
|
$feede-><M::Node.appendChild> ($updatede); |
872 |
|
|
}__; |
873 |
|
|
|
874 |
|
|
@@Test: |
875 |
|
|
@@@QName: AtomImplementation.createAtomFeedDocument.test |
876 |
|
|
@@@PerlDef: |
877 |
|
|
my $impl; |
878 |
|
|
__CODE{tc|createImplForTest:: $impl => $impl}__; |
879 |
|
|
$impl = $impl->get_feature (<Q::fe|Atom> => '1.0'); |
880 |
|
|
|
881 |
|
|
my $doc = $impl-><M::AtomImplementation.createAtomFeedDocument> |
882 |
|
|
('about:id', 'feed title', 'en'); |
883 |
|
|
|
884 |
|
|
$test->id ('document.interface'); |
885 |
|
|
$test->assert_isa ($doc, <IFName::Document>); |
886 |
|
|
|
887 |
|
|
$test->id ('document.xmlVersion'); |
888 |
|
|
$test->assert_equals ($doc-><AG::Document.xmlVersion>, '1.0'); |
889 |
|
|
|
890 |
|
|
my $feed = $doc-><AG::Document.documentElement>; |
891 |
|
|
|
892 |
|
|
$test->id ('feed.namespaceURI'); |
893 |
|
|
$test->assert_equals ($feed-><AG::Node.namespaceURI>, <Q::atom|>); |
894 |
|
|
|
895 |
|
|
$test->id ('feed.localName'); |
896 |
|
|
$test->assert_equals ($feed-><AG::Node.localName>, 'feed'); |
897 |
|
|
|
898 |
|
|
$test->id ('feed.lang'); |
899 |
|
|
$test->assert_equals ($feed-><M::Element.getAttributeNS> |
900 |
|
|
(<Q::xml|>, 'lang'), |
901 |
|
|
'en'); |
902 |
|
|
|
903 |
|
|
my $id; |
904 |
|
|
my $title; |
905 |
|
|
my $updated; |
906 |
|
|
|
907 |
|
|
for my $cn (@{$feed-><AG::Node.childNodes>}) { |
908 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
909 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
910 |
|
|
if ($cn-><AG::Node.localName> eq 'id') { |
911 |
|
|
$id = $cn; |
912 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'title') { |
913 |
|
|
$title = $cn; |
914 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'updated') { |
915 |
|
|
$updated = $cn; |
916 |
|
|
} |
917 |
|
|
} |
918 |
|
|
} |
919 |
|
|
|
920 |
|
|
$test->id ('id'); |
921 |
|
|
$test->assert_not_null ($id); |
922 |
|
|
|
923 |
|
|
$test->id ('id.value'); |
924 |
|
|
$test->assert_equals ($id-><AG::Node.textContent>, 'about:id'); |
925 |
|
|
|
926 |
|
|
$test->id ('title'); |
927 |
|
|
$test->assert_not_null ($title); |
928 |
|
|
|
929 |
|
|
$test->id ('title.value'); |
930 |
|
|
$test->assert_equals ($title-><AG::Node.textContent>, 'feed title'); |
931 |
|
|
|
932 |
|
|
$test->id ('title.type'); |
933 |
|
|
$test->assert_null ($title-><M::Element.getAttributeNS> (null, 'type')); |
934 |
|
|
|
935 |
|
|
$test->id ('updated'); |
936 |
|
|
$test->assert_not_null ($updated); |
937 |
|
|
|
938 |
|
|
$test->id ('updated.value'); |
939 |
|
|
$test->assert_num_not_equals |
940 |
|
|
(actual_value => $updated-><AG::AtomDateConstruct.value>, |
941 |
|
|
expected_value => 0); |
942 |
|
|
|
943 |
|
|
@Method: |
944 |
|
|
@@Name: createAtomEntryDocument |
945 |
|
|
@@enDesc: |
946 |
|
|
Creates an Atom Entry Document object. |
947 |
|
|
@@Param: |
948 |
|
|
@@@Name: id |
949 |
|
|
@@@Type: DOMString |
950 |
|
|
@@@actualType: DOMURI |
951 |
|
|
@@@enDesc: |
952 |
|
|
The <XE::atom|id> of the entry. |
953 |
|
|
@@Param: |
954 |
|
|
@@@Name: title |
955 |
|
|
@@@Type: DOMString |
956 |
|
|
@@@enDesc: |
957 |
|
|
The <XE::atom|title> of the entry. |
958 |
|
|
@@@nullCase: |
959 |
|
|
@@@@enDesc: |
960 |
|
|
The implementation <kwd:MUST> treate <DOM::null> |
961 |
|
|
as if an empty string is specified. |
962 |
|
|
@@Param: |
963 |
|
|
@@@Name: lang |
964 |
|
|
@@@Type: DOMString |
965 |
|
|
@@@enDesc: |
966 |
|
|
The natural language of the entry. |
967 |
|
|
@@@nullCase: |
968 |
|
|
@@@@enDesc: |
969 |
|
|
The implementation <kwd:MUST> treate <DOM::null> |
970 |
|
|
as if an empty string is specified. |
971 |
|
|
@@Return: |
972 |
|
|
@@@Type: AtomEntryDocument |
973 |
|
|
@@@enDesc: |
974 |
|
|
The newly created Atom Entry Document. |
975 |
|
|
|
976 |
|
|
{P:: The returned object <kwd:MUST> be a <IF::Document> node |
977 |
|
|
with attributes: |
978 |
|
|
|
979 |
|
|
- <A::Node.childNodes>::: A <IF::NodeList> containing |
980 |
|
|
a new <XE::atom|entry> element node. |
981 |
|
|
|
982 |
|
|
- <A::Document.xmlVersion>::: <XML::1.0>. |
983 |
|
|
|
984 |
|
|
} |
985 |
|
|
|
986 |
|
|
{P:: The newly created <XE::atom|entry> element node <kwd:MUST> |
987 |
|
|
have attributes set as: |
988 |
|
|
|
989 |
|
|
- <A::Node.attributes>::: A <IF::NamedNodeMap> that contains |
990 |
|
|
at least a new <XA::xml|lang> |
991 |
|
|
attribute node. |
992 |
|
|
|
993 |
|
|
- <A::Node.childNodes>::: A <IF::NodeList> containing |
994 |
|
|
a new <XE::atom|id> element node, |
995 |
|
|
a new <XE::atom|title> element node, and |
996 |
|
|
a new <XE::atom|updated> element node |
997 |
|
|
in any order. |
998 |
|
|
|
999 |
|
|
} |
1000 |
|
|
|
1001 |
|
|
{P:: The newly created <XA::xml|lang> attribute node <kwd:MUST> |
1002 |
|
|
have attributes set as: |
1003 |
|
|
|
1004 |
|
|
- <A::Node.nodeValue>::: <P::lang>. |
1005 |
|
|
|
1006 |
|
|
- <A::Attr.specified>::: <DOM::true>. |
1007 |
|
|
|
1008 |
|
|
} |
1009 |
|
|
|
1010 |
|
|
{P:: The newly created <XE::atom|id> element node <kwd:MUST> |
1011 |
|
|
have attributes set as: |
1012 |
|
|
|
1013 |
|
|
- <A::Node.textContent>::: <P::id>. |
1014 |
|
|
|
1015 |
|
|
} |
1016 |
|
|
|
1017 |
|
|
{P:: The newly created <XE::atom|title> element node <kwd:MUST> |
1018 |
|
|
have attributes set as: |
1019 |
|
|
|
1020 |
|
|
- <A::Node.textContent>::: <P::title>. |
1021 |
|
|
|
1022 |
|
|
} |
1023 |
|
|
|
1024 |
|
|
The <XA::type> attribute node <kwd:MUST-NOT> be attached |
1025 |
|
|
to the <XE::atom|title> element node. |
1026 |
|
|
|
1027 |
|
|
{P:: The newly created <XE::atom|updated> element node <kwd:MUST> |
1028 |
|
|
have attributes set as: |
1029 |
|
|
|
1030 |
|
|
- <A::Node.textContent>::: A uppercase RFC 3339 <CODE::date-time> |
1031 |
|
|
representation of the time when the method is invoked. |
1032 |
|
|
The implementation <kwd:MAY> align its timezone to |
1033 |
|
|
that of the environment in which the method is invoked. |
1034 |
|
|
|
1035 |
|
|
} |
1036 |
|
|
@@@PerlDef: |
1037 |
|
|
__DEEP{ |
1038 |
|
|
$r = $self-><M::c|DOMImplementation.createDocument> |
1039 |
|
|
(<Q::atom|>, 'entry'); |
1040 |
|
|
$r-><AS::Document.xmlVersion> ('1.0'); |
1041 |
|
|
|
1042 |
|
|
my $feede = $r-><AG::Document.documentElement>; |
1043 |
|
|
$feede-><AS::Node.manakaiLanguage> (defined $lang ? $lang : ''); |
1044 |
|
|
|
1045 |
|
|
$feede-><AS::AtomFeedElement.id> ($id); |
1046 |
|
|
|
1047 |
|
|
my $titlee = $r-><M::Document.createElementNS> (<Q::atom|>, 'title'); |
1048 |
|
|
$titlee-><AS::Node.textContent> (defined $title ? $title : ''); |
1049 |
|
|
$feede-><M::Node.appendChild> ($titlee); |
1050 |
|
|
|
1051 |
|
|
my $updatede = $r-><M::Document.createElementNS> |
1052 |
|
|
(<Q::atom|>, 'updated'); |
1053 |
|
|
$updatede-><AS::AtomDateConstruct.value> (scalar time); |
1054 |
|
|
$feede-><M::Node.appendChild> ($updatede); |
1055 |
|
|
}__; |
1056 |
|
|
|
1057 |
|
|
@@Test: |
1058 |
|
|
@@@QName: AtomImplementation.createAtomEntryDocument.test |
1059 |
|
|
@@@PerlDef: |
1060 |
|
|
my $impl; |
1061 |
|
|
__CODE{tc|createImplForTest:: $impl => $impl}__; |
1062 |
|
|
$impl = $impl->get_feature (<Q::fe|Atom> => '1.0'); |
1063 |
|
|
|
1064 |
|
|
my $doc = $impl-><M::AtomImplementation.createAtomEntryDocument> |
1065 |
|
|
('about:id', 'entry title', 'en'); |
1066 |
|
|
|
1067 |
|
|
$test->id ('document.interface'); |
1068 |
|
|
$test->assert_isa ($doc, <IFName::Document>); |
1069 |
|
|
|
1070 |
|
|
$test->id ('document.xmlVersion'); |
1071 |
|
|
$test->assert_equals ($doc-><AG::Document.xmlVersion>, '1.0'); |
1072 |
|
|
|
1073 |
|
|
my $feed = $doc-><AG::Document.documentElement>; |
1074 |
|
|
|
1075 |
|
|
$test->id ('feed.namespaceURI'); |
1076 |
|
|
$test->assert_equals ($feed-><AG::Node.namespaceURI>, <Q::atom|>); |
1077 |
|
|
|
1078 |
|
|
$test->id ('feed.localName'); |
1079 |
|
|
$test->assert_equals ($feed-><AG::Node.localName>, 'entry'); |
1080 |
|
|
|
1081 |
|
|
$test->id ('feed.lang'); |
1082 |
|
|
$test->assert_equals ($feed-><M::Element.getAttributeNS> |
1083 |
|
|
(<Q::xml|>, 'lang'), |
1084 |
|
|
'en'); |
1085 |
|
|
|
1086 |
|
|
my $id; |
1087 |
|
|
my $title; |
1088 |
|
|
my $updated; |
1089 |
|
|
|
1090 |
|
|
for my $cn (@{$feed-><AG::Node.childNodes>}) { |
1091 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1092 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
1093 |
|
|
if ($cn-><AG::Node.localName> eq 'id') { |
1094 |
|
|
$id = $cn; |
1095 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'title') { |
1096 |
|
|
$title = $cn; |
1097 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'updated') { |
1098 |
|
|
$updated = $cn; |
1099 |
|
|
} |
1100 |
|
|
} |
1101 |
|
|
} |
1102 |
|
|
|
1103 |
|
|
$test->id ('id'); |
1104 |
|
|
$test->assert_not_null ($id); |
1105 |
|
|
|
1106 |
|
|
$test->id ('id.value'); |
1107 |
|
|
$test->assert_equals ($id-><AG::Node.textContent>, 'about:id'); |
1108 |
|
|
|
1109 |
|
|
$test->id ('title'); |
1110 |
|
|
$test->assert_not_null ($title); |
1111 |
|
|
|
1112 |
|
|
$test->id ('title.value'); |
1113 |
|
|
$test->assert_equals ($title-><AG::Node.textContent>, 'entry title'); |
1114 |
|
|
|
1115 |
|
|
$test->id ('title.type'); |
1116 |
|
|
$test->assert_null ($title-><M::Element.getAttributeNS> (null, 'type')); |
1117 |
|
|
|
1118 |
|
|
$test->id ('updated'); |
1119 |
|
|
$test->assert_not_null ($updated); |
1120 |
|
|
|
1121 |
|
|
$test->id ('updated.value'); |
1122 |
|
|
$test->assert_num_not_equals |
1123 |
|
|
(actual_value => $updated-><AG::AtomDateConstruct.value>, |
1124 |
|
|
expected_value => 0); |
1125 |
|
|
|
1126 |
|
|
@enImplNote: |
1127 |
|
|
@@ddid: imt |
1128 |
|
|
@@@: |
1129 |
|
|
{ISSUE:: |
1130 |
|
|
The <CODE::contentType> attribute of the created document |
1131 |
|
|
should be set to <CODE::application/atom+xml>? |
1132 |
|
|
} |
1133 |
|
|
|
1134 |
|
|
@CODE: |
1135 |
|
|
@@QName: returnChildElement |
1136 |
|
|
@@enDesc: |
1137 |
|
|
{P:: The algorithm to <DFN::return <VAR::element-type> child |
1138 |
|
|
element> of the element node <VAR::E> is defined as: |
1139 |
|
|
|
1140 |
|
|
= If <VAR::E> contains one or more child element node |
1141 |
|
|
whose element type is <VAR::element-type>, |
1142 |
|
|
it <kwd:MUST> return the first such element node |
1143 |
|
|
in document order. |
1144 |
|
|
|
1145 |
|
|
{OLI:: Otherwise, |
1146 |
|
|
|
1147 |
|
|
{OLI:: If the <cfg::cfg|create-child-element> configuration |
1148 |
|
|
parameter is set to <DOM::true>, |
1149 |
|
|
|
1150 |
|
|
= Create an element node <VAR::N> whose element type |
1151 |
|
|
is <VAR::element-type>. |
1152 |
|
|
|
1153 |
|
|
= Append <VAR::N> to <VAR::E> as if the <M::Node.appendChild> |
1154 |
|
|
method were called for <VAR::E> with its parameter |
1155 |
|
|
set to <VAR::N>. Note that this might throw an exception. |
1156 |
|
|
|
1157 |
|
|
= Then, <VAR::N> <kwd:MUST> be returned. |
1158 |
|
|
|
1159 |
|
|
} |
1160 |
|
|
|
1161 |
|
|
= Otherwise, <DOM::null> <kwd:MUST> be returned. |
1162 |
|
|
|
1163 |
|
|
} |
1164 |
|
|
|
1165 |
|
|
} |
1166 |
|
|
@@PerlDef: |
1167 |
|
|
__DEEP{ |
1168 |
|
|
E: { |
1169 |
|
|
no warnings 'uninitialized'; |
1170 |
|
|
for my $__el (@{$node-><AG::Node.childNodes>}) { |
1171 |
|
|
if ($__el-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1172 |
|
|
$__el-><AG::Node.localName> eq $localName and |
1173 |
|
|
$__el-><AG::Node.namespaceURI> eq $namespaceURI) { |
1174 |
|
|
$r = $__el; |
1175 |
|
|
last E; |
1176 |
|
|
} |
1177 |
|
|
} |
1178 |
|
|
|
1179 |
|
|
my $od = $node-><AG::Node.ownerDocument>; |
1180 |
|
|
if ($od-><AG::Document.domConfig> |
1181 |
|
|
-><M::CFG.getParameter> (<Q::cfg|create-child-element>)) { |
1182 |
|
|
$r = $od-><M::Document.createElementNS> ($namespaceURI, $localName); |
1183 |
|
|
$node-><M::Node.appendChild> ($r); |
1184 |
|
|
} |
1185 |
|
|
} # E |
1186 |
|
|
}__; |
1187 |
|
|
|
1188 |
|
|
@CODE: |
1189 |
|
|
@@QName: returnChildElementList |
1190 |
|
|
@@enDesc: |
1191 |
|
|
{P:: The algorithm to <DFN::return <VAR::element-type> child |
1192 |
|
|
element list> of the element node <VAR::E> is defined as: |
1193 |
|
|
|
1194 |
|
|
= Creates an empty <IF::StaticNodeList> object <VAR::L> |
1195 |
|
|
that is <EM::not> read-only. |
1196 |
|
|
|
1197 |
|
|
= For each child element node of <VAR::E>, |
1198 |
|
|
add that element node to <VAR::L> in document order |
1199 |
|
|
if its element type is <VAR::element-type>. |
1200 |
|
|
|
1201 |
|
|
= Returns <VAR::E>. |
1202 |
|
|
|
1203 |
|
|
} |
1204 |
|
|
@@PerlDef: |
1205 |
|
|
__DEEP{ |
1206 |
|
|
no warnings 'uninitialized'; |
1207 |
|
|
__CODE{tc|createStaticNodeList:: $r => $r}__; |
1208 |
|
|
for my $__el (@{$node-><AG::Node.childNodes>}) { |
1209 |
|
|
if ($__el-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1210 |
|
|
$__el-><AG::Node.localName> eq $localName and |
1211 |
|
|
$__el-><AG::Node.namespaceURI> eq $namespaceURI) { |
1212 |
|
|
push @{$r}, $__el; |
1213 |
|
|
} |
1214 |
|
|
} |
1215 |
|
|
}__; |
1216 |
|
|
|
1217 |
|
|
@CODE: |
1218 |
|
|
@@QName: getReflectStringValue |
1219 |
|
|
@@enDesc: |
1220 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the string value |
1221 |
|
|
of the <VAR::element-type> child element> of the node <VAR::E>, |
1222 |
|
|
the getter of the attribute <kwd:MUST> return the value |
1223 |
|
|
defined by the algorithm: |
1224 |
|
|
|
1225 |
|
|
= If the <VAR::E> contains a child element node <VAR::C> whose element |
1226 |
|
|
type is <VAR::element-type>, it <kwd:MUST> return |
1227 |
|
|
the <A::Node.textContent> value of the <VAR::C>. |
1228 |
|
|
|
1229 |
|
|
= Otherwise, it <kwd:MUST> return <DOM::null>. |
1230 |
|
|
|
1231 |
|
|
} |
1232 |
|
|
@@PerlDef: |
1233 |
|
|
__DEEP{ |
1234 |
|
|
E: { |
1235 |
|
|
no warnings 'uninitialized'; |
1236 |
|
|
for my $__cn (@{$node-><AG::Node.childNodes>}) { |
1237 |
|
|
if ($__cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1238 |
|
|
$__cn-><AG::Node.localName> eq $localName and |
1239 |
|
|
$__cn-><AG::Node.namespaceURI> eq $namespaceURI) { |
1240 |
|
|
$r = $__cn-><AG::Node.textContent>; |
1241 |
|
|
last E; |
1242 |
|
|
} |
1243 |
|
|
} |
1244 |
|
|
$r = null; |
1245 |
|
|
} # E |
1246 |
|
|
}__; |
1247 |
|
|
|
1248 |
|
|
@CODE: |
1249 |
|
|
@@QName: setReflectStringValue |
1250 |
|
|
@@enDesc: |
1251 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the string value |
1252 |
|
|
of the <VAR::element-type> child element> of the node <VAR::E>, |
1253 |
|
|
the setter of the attribute <kwd:MUST> modify the node as |
1254 |
|
|
defined by the algorithm: |
1255 |
|
|
|
1256 |
|
|
= If the given value is <DOM::null>, any child elements |
1257 |
|
|
whose element types are <VAR::element-type> <kwd:MUST> |
1258 |
|
|
be removed from the list of child nodes. |
1259 |
|
|
|
1260 |
|
|
= Otherwise, if there is no <VAR::element-type> child element |
1261 |
|
|
node in the child node list of the <VAR::E>, it |
1262 |
|
|
<kwd:MUST> create an element node whose element type |
1263 |
|
|
is <VAR::element-type>, append it to the <VAR::E> as |
1264 |
|
|
if the <M::Node.appendChild> method were invoked, and |
1265 |
|
|
set the <A::Node.textContent> of the newly created |
1266 |
|
|
element node to the given value. |
1267 |
|
|
|
1268 |
|
|
= Otherwise, it <kwd:MUST> set the <A::Node.textContent> |
1269 |
|
|
of the first <VAR::element-type> child element node |
1270 |
|
|
in the child node list of the <VAR::E> to the given value. |
1271 |
|
|
|
1272 |
|
|
} |
1273 |
|
|
|
1274 |
|
|
{NOTE:: |
1275 |
|
|
It might throw an exception. |
1276 |
|
|
} |
1277 |
|
|
@@PerlDef: |
1278 |
|
|
__DEEP{ |
1279 |
|
|
no warnings 'uninitialized'; |
1280 |
|
|
if (defined $given) { |
1281 |
|
|
my $__target; |
1282 |
|
|
E: { |
1283 |
|
|
for my $__cl (@{$node-><AG::Node.childNodes>}) { |
1284 |
|
|
if ($__cl-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1285 |
|
|
$__cl-><AG::Node.localName> eq $localName and |
1286 |
|
|
$__cl-><AG::Node.namespaceURI> eq $namespaceURI) { |
1287 |
|
|
$__target = $__cl; |
1288 |
|
|
last E; |
1289 |
|
|
} |
1290 |
|
|
} |
1291 |
|
|
|
1292 |
|
|
$__target = $node-><AG::Node.ownerDocument> |
1293 |
|
|
-><M::Document.createElementNS> |
1294 |
|
|
($namespaceURI, $localName); |
1295 |
|
|
$node-><M::Node.appendChild> ($__target); |
1296 |
|
|
} # E |
1297 |
|
|
|
1298 |
|
|
$__target-><AS::Node.textContent> ($given); |
1299 |
|
|
} else { |
1300 |
|
|
my @__remove; |
1301 |
|
|
for my $__cl (@{$node-><AG::Node.childNodes>}) { |
1302 |
|
|
if ($__cl-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1303 |
|
|
$__cl-><AG::Node.localName> eq $localName and |
1304 |
|
|
$__cl-><AG::Node.namespaceURI> eq $namespaceURI) { |
1305 |
|
|
push @__remove, $__cl; |
1306 |
|
|
} |
1307 |
|
|
} |
1308 |
|
|
$node-><M::Node.removeChild> ($_) for @__remove; |
1309 |
|
|
} |
1310 |
|
|
}__; |
1311 |
|
|
|
1312 |
|
|
@CODE: |
1313 |
|
|
@@QName: getReflectAttrStringValue |
1314 |
|
|
@@enDesc: |
1315 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the string value |
1316 |
|
|
of the <VAR::attr-name> attribute> of the node <VAR::E>, |
1317 |
|
|
the getter of the attribute <kwd:MUST> return the value |
1318 |
|
|
defined by the algorithm: |
1319 |
|
|
|
1320 |
|
|
= If the <VAR::E> contains an attribute node <VAR::A> whose name |
1321 |
|
|
is <VAR::attr-name>, it <kwd:MUST> return |
1322 |
|
|
the <A::Node.nodeValue> of the <VAR::A>. |
1323 |
|
|
|
1324 |
|
|
= If a default value is explicitly defined |
1325 |
|
|
where this algorithm is referenced, it <kwd:MUST> |
1326 |
|
|
return the default value. |
1327 |
|
|
|
1328 |
|
|
= Otherwise, it <kwd:MUST> return <DOM::null>. |
1329 |
|
|
|
1330 |
|
|
} |
1331 |
|
|
@@PerlDef: |
1332 |
|
|
__DEEP{ |
1333 |
|
|
E: { |
1334 |
|
|
$r = $node-><M::Element.getAttributeNS> ($namespaceURI, $localName); |
1335 |
|
|
last E if defined $r; |
1336 |
|
|
|
1337 |
|
|
$r = $defaultValue; |
1338 |
|
|
} # E |
1339 |
|
|
}__; |
1340 |
|
|
|
1341 |
|
|
@CODE: |
1342 |
|
|
@@QName: setReflectAttrStringValue |
1343 |
|
|
@@enDesc: |
1344 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the string value |
1345 |
|
|
of the <VAR::attr-name> attribute> of the node <VAR::E>, |
1346 |
|
|
the setter of the attribute <kwd:MUST> modify the node as |
1347 |
|
|
defined by the algorithm: |
1348 |
|
|
|
1349 |
|
|
= If the given value is <DOM::null>, it <kwd:MUST> |
1350 |
|
|
remove the <VAR::attr-name> attribute node, if any, |
1351 |
|
|
from the list of attribute nodes of <VAR::E>. |
1352 |
|
|
|
1353 |
|
|
= Otherwise, it <kwd:MUST> set the <VAR::attr-name> |
1354 |
|
|
attribute node value to the given value as if |
1355 |
|
|
the <M::Element.setAttributeNS> method were invoked. |
1356 |
|
|
|
1357 |
|
|
} |
1358 |
|
|
|
1359 |
|
|
{NOTE:: |
1360 |
|
|
It might throw an exception. |
1361 |
|
|
} |
1362 |
|
|
@@PerlDef: |
1363 |
|
|
__DEEP{ |
1364 |
|
|
if (defined $given) { |
1365 |
|
|
$node-><M::Element.setAttributeNS> ($namespaceURI, $localName, $given); |
1366 |
|
|
} else { |
1367 |
|
|
$node-><M::Element.removeAttributeNS> ($namespaceURI, $localName); |
1368 |
|
|
} |
1369 |
|
|
}__; |
1370 |
|
|
|
1371 |
|
|
@CODE: |
1372 |
|
|
@@QName: getReflectURIValue |
1373 |
|
|
@@enDesc: |
1374 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the URI value |
1375 |
|
|
of the <VAR::element-type> child element> of the node <VAR::E>, |
1376 |
|
|
the getter of the attribute <kwd:MUST> return the value |
1377 |
|
|
defined by the algorithm: |
1378 |
|
|
|
1379 |
|
|
= Get the string <VAR::S> that would be returned |
1380 |
|
|
if the DOM attribute <I::reflects the string value |
1381 |
|
|
of the <VAR::element-type> child element> of the <VAR::E>. |
1382 |
|
|
|
1383 |
|
|
= If the <VAR::S> is <DOM::null>, it <kwd:MUST> return |
1384 |
|
|
<DOM::null>. |
1385 |
|
|
|
1386 |
|
|
= Otherwise, if the <A::Node.baseURI> of the node |
1387 |
|
|
from which the <VAR::S> comes is <DOM::null>, |
1388 |
|
|
it <kwd:MUST> return the <VAR::S>. |
1389 |
|
|
|
1390 |
|
|
= Otherwise, a string that would be returned by the |
1391 |
|
|
<M::urigen|URIReference.getAbsoluteReference> |
1392 |
|
|
method on a <IF::urigen|URIReference> object whose |
1393 |
|
|
<A::urigen|URIReference.uriReference> value |
1394 |
|
|
equals to <A::Node.textContent> with the <CODE::base> parameter |
1395 |
|
|
set to the <A::Node.baseURI> of the node |
1396 |
|
|
from which the <VAR::S> comes and the <CODE::nonStrict> |
1397 |
|
|
parameter set to <DOM::false>. |
1398 |
|
|
|
1399 |
|
|
} |
1400 |
|
|
@@PerlDef: |
1401 |
|
|
__DEEP{ |
1402 |
|
|
E: { |
1403 |
|
|
no warnings 'uninitialized'; |
1404 |
|
|
for my $__cn (@{$node-><AG::Node.childNodes>}) { |
1405 |
|
|
if ($__cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
1406 |
|
|
$__cn-><AG::Node.localName> eq $localName and |
1407 |
|
|
$__cn-><AG::Node.namespaceURI> eq $namespaceURI) { |
1408 |
|
|
my $__ref_buri = $__cn-><AG::Node.baseURI>; |
1409 |
|
|
if (defined $__ref_buri) { |
1410 |
|
|
$r = $node-><AG::Node.ownerDocument> |
1411 |
|
|
-><AG::Document.implementation> |
1412 |
|
|
-><M::urigen|URIImplementation.createURIReference> |
1413 |
|
|
($__cn-><AG::Node.textContent>) |
1414 |
|
|
-><M::urigen|URIReference.getAbsoluteReference> |
1415 |
|
|
($__ref_buri) |
1416 |
|
|
-><AG::urigen|URIReference.uriReference>; |
1417 |
|
|
} else { |
1418 |
|
|
$r = $__cn-><AG::Node.textContent>; |
1419 |
|
|
} |
1420 |
|
|
last E; |
1421 |
|
|
} |
1422 |
|
|
} |
1423 |
|
|
$r = null; |
1424 |
|
|
} # E |
1425 |
|
|
}__; |
1426 |
|
|
|
1427 |
|
|
@CODE: |
1428 |
|
|
@@QName: setReflectURIValue |
1429 |
|
|
@@enDesc: |
1430 |
|
|
If a DOM attribute is defined to <DFN::reflect the URI value |
1431 |
|
|
of the <VAR::element-type> child element> of the node <VAR::E>, |
1432 |
|
|
the setter of the attribute <kwd:MUST> modify the node as |
1433 |
|
|
if the DOM attribute <I::reflects the string value of |
1434 |
|
|
the <VAR::element-type> child element> of the <VAR::E>. |
1435 |
|
|
|
1436 |
|
|
{NOTE:: |
1437 |
|
|
It might throw an exception. |
1438 |
|
|
} |
1439 |
|
|
@@PerlDef: |
1440 |
|
|
__CODE{setReflectStringValue}__; |
1441 |
|
|
|
1442 |
|
|
@CODE: |
1443 |
|
|
@@QName: getReflectAttrURIValue |
1444 |
|
|
@@enDesc: |
1445 |
|
|
{P:: If a DOM attribute is defined to <DFN::reflect the URI value |
1446 |
|
|
of the <VAR::attr-name> attribute> of the node <VAR::E>, |
1447 |
|
|
the getter of the attribute <kwd:MUST> return the value |
1448 |
|
|
defined by the algorithm: |
1449 |
|
|
|
1450 |
|
|
= Get the string <VAR::S> that would be returned |
1451 |
|
|
if the DOM attribute <I::reflects the string value |
1452 |
|
|
of the <VAR::attr-name> attribute> of the <VAR::E>. |
1453 |
|
|
|
1454 |
|
|
= If the <VAR::S> is <DOM::null>, it <kwd:MUST> return |
1455 |
|
|
<DOM::null>. |
1456 |
|
|
|
1457 |
|
|
= Otherwise, if the <A::Node.baseURI> of the node |
1458 |
|
|
from which the <VAR::S> comes is <DOM::null>, |
1459 |
|
|
it <kwd:MUST> return the <VAR::S>. |
1460 |
|
|
|
1461 |
|
|
= Otherwise, a string that would be returned by the |
1462 |
|
|
<M::urigen|URIReference.getAbsoluteReference> |
1463 |
|
|
method on a <IF::urigen|URIReference> object whose |
1464 |
|
|
<A::urigen|URIReference.uriReference> value |
1465 |
|
|
equals to <A::Node.textContent> with the <CODE::base> parameter |
1466 |
|
|
set to the <A::Node.baseURI> of the node |
1467 |
|
|
from which the <VAR::S> comes and the <CODE::nonStrict> |
1468 |
|
|
parameter set to <DOM::false>. |
1469 |
|
|
|
1470 |
|
|
} |
1471 |
|
|
@@PerlDef: |
1472 |
|
|
__DEEP{ |
1473 |
|
|
my $__attr = $node-><M::Element.getAttributeNodeNS> |
1474 |
|
|
($namespaceURI, $localName); |
1475 |
|
|
if (defined $__attr) { |
1476 |
|
|
my $__attr_base = $__attr-><AG::Node.baseURI>; |
1477 |
|
|
if (defined $__attr_base) { |
1478 |
|
|
$r = $node-><AG::Node.ownerDocument> |
1479 |
|
|
-><AG::Document.implementation> |
1480 |
|
|
-><M::urigen|URIImplementation.createURIReference> |
1481 |
|
|
($__attr-><AG::Node.nodeValue>) |
1482 |
|
|
-><M::urigen|URIReference.getAbsoluteReference> |
1483 |
|
|
($__attr_base) |
1484 |
|
|
-><AG::urigen|URIReference.uriReference>; |
1485 |
|
|
} else { |
1486 |
|
|
$r = $__attr-><AG::Node.nodeValue>; |
1487 |
|
|
} |
1488 |
|
|
} else { |
1489 |
|
|
$r = null; |
1490 |
|
|
} |
1491 |
|
|
}__; |
1492 |
|
|
|
1493 |
|
|
@CODE: |
1494 |
|
|
@@QName: setReflectAttrURIValue |
1495 |
|
|
@@enDesc: |
1496 |
|
|
If a DOM attribute is defined to <DFN::reflect the URI value |
1497 |
|
|
of the <VAR::attr-name> attribute> of the node <VAR::E>, |
1498 |
|
|
the setter of the DOM attribute <kwd:MUST> modify the node as |
1499 |
|
|
if the DOM attribute <I::reflects the string value of |
1500 |
|
|
the <VAR::attr-name> attribute> of the <VAR::E>. |
1501 |
|
|
|
1502 |
|
|
{NOTE:: |
1503 |
|
|
It might throw an exception. |
1504 |
|
|
} |
1505 |
|
|
@@PerlDef: |
1506 |
|
|
__CODE{setReflectAttrStringValue}__; |
1507 |
|
|
|
1508 |
|
|
@enImplNote: |
1509 |
|
|
@@ddid: datereflect |
1510 |
|
|
@@@: |
1511 |
|
|
{ISSUE:: |
1512 |
|
|
<QUOTE::reflecting Date child element> attribute should |
1513 |
|
|
be provided for published and created? |
1514 |
|
|
} |
1515 |
|
|
##AtomImplementation |
1516 |
|
|
|
1517 |
|
|
IFClsDef: |
1518 |
|
|
@IFQName: AtomDocument |
1519 |
|
|
@ClsQName: ManakaiAtomDocument |
1520 |
|
|
|
1521 |
|
|
@IFISA: Document |
1522 |
|
|
@ClsISA: td|ManakaiDOMDocument |
1523 |
|
|
|
1524 |
|
|
@s:rootElementType: AnyAtomElement||ManakaiDOM|all |
1525 |
|
|
|
1526 |
|
|
@enDesc: |
1527 |
|
|
If the <Feature::fe|Atom> feature version <FeatureVer::1.0> |
1528 |
|
|
is supported, a <IF::Document> object whose <A::Document.documentElement>'s |
1529 |
|
|
<A::Node.namespaceURI>, if any, is <URI^^DISCore|QName::atom|> at least |
1530 |
|
|
at the time of creation <kwd:MUST> also |
1531 |
|
|
implement the <IF::AtomDocument> interface. Other |
1532 |
|
|
<IF:Document> objects <kwd:MAY> also implement |
1533 |
|
|
the <IF::AtomDocument> interface. |
1534 |
|
|
|
1535 |
|
|
@Test: |
1536 |
|
|
@@QName: createDocument.AtomDocument.test |
1537 |
|
|
@@PerlDef: |
1538 |
|
|
my $impl; |
1539 |
|
|
__CODE{tc|createImplForTest:: $impl => $impl}__; |
1540 |
|
|
|
1541 |
|
|
my $doc = $impl-><M::c|DOMImplementation.createDocument> |
1542 |
|
|
(<Q::atom|>, 'unknown'); |
1543 |
|
|
|
1544 |
|
|
$test->id ('interface'); |
1545 |
|
|
$test->assert_isa ($doc, <IFName::AtomDocument>); |
1546 |
|
|
##AtomDocument |
1547 |
|
|
|
1548 |
|
|
IFClsDef: |
1549 |
|
|
@IFQName: AtomFeedDocument |
1550 |
|
|
@ClsQName: ManakaiFeedEntryDocument |
1551 |
|
|
|
1552 |
|
|
@IFISA: AtomDocument |
1553 |
|
|
@ClsISA: ManakaiAtomDocument |
1554 |
|
|
|
1555 |
|
|
@s:rootElementType: |
1556 |
|
|
@@@: atom|feed |
1557 |
|
|
@@DISCore:stopISARecursive: 1 |
1558 |
|
|
|
1559 |
|
|
@enDesc: |
1560 |
|
|
The <IF::AtomFeedDocument> interface provides convenience |
1561 |
|
|
methods and attributes for an Atom |
1562 |
|
|
Feed Document, i.e. representation of an Atom feed. |
1563 |
|
|
|
1564 |
|
|
If the <Feature::fe|Atom> feature version <FeatureVer::1.0> |
1565 |
|
|
is supported, a <IF::Document> object whose <A::Document.documentElement>'s |
1566 |
|
|
element type, if any, is <XE::atom|feed> at least at |
1567 |
|
|
the time of creation <kwd:MUST> also |
1568 |
|
|
implement the <IF::AtomFeedDocument> interface. Other |
1569 |
|
|
<IF::Document> objects <kwd:MAY> also implement |
1570 |
|
|
the <IF::AtomFeedDocument> interface. |
1571 |
|
|
|
1572 |
|
|
@Test: |
1573 |
|
|
@@QName: createDocument.AtomFeedDocument.test |
1574 |
|
|
@@PerlDef: |
1575 |
|
|
my $impl; |
1576 |
|
|
__CODE{tc|createImplForTest:: $impl => $impl}__; |
1577 |
|
|
|
1578 |
|
|
my $doc = $impl-><M::c|DOMImplementation.createDocument> |
1579 |
|
|
(<Q::atom|>, 'feed'); |
1580 |
|
|
|
1581 |
|
|
$test->id ('interface'); |
1582 |
|
|
$test->assert_isa ($doc, <IFName::AtomFeedDocument>); |
1583 |
|
|
##AtomFeedDocument |
1584 |
|
|
|
1585 |
|
|
IFClsDef: |
1586 |
|
|
@IFQName: AtomEntryDocument |
1587 |
|
|
@ClsQName: ManakaiAtomEntryDocument |
1588 |
|
|
|
1589 |
|
|
@IFISA: AtomDocument |
1590 |
|
|
@ClsISA: ManakaiAtomDocument |
1591 |
|
|
|
1592 |
|
|
@s:rootElementType: |
1593 |
|
|
@@@: atom|entry |
1594 |
|
|
@@DISCore:stopISARecursive: 1 |
1595 |
|
|
|
1596 |
|
|
@enDesc: |
1597 |
|
|
The <IF::AtomEntryDocument> interface provides convenience |
1598 |
|
|
methods and attributes for an Atom |
1599 |
|
|
Entry Document, i.e. exactly one Atom entry, outside |
1600 |
|
|
of the context of an Atom feed. |
1601 |
|
|
|
1602 |
|
|
If the <Feature::fe|Atom> feature version <FeatureVer::1.0> |
1603 |
|
|
is supported, a <IF::Document> object whose <A::Document.documentElement>'s |
1604 |
|
|
element type, if any, is <XE::atom|entry> at least at |
1605 |
|
|
the time of the creation <kwd:MUST> also |
1606 |
|
|
implement the <IF::AtomEntryDocument> interface. Other |
1607 |
|
|
<IF::Document> objects <kwd:MAY> also implement |
1608 |
|
|
the <IF::AtomEntryDocument> interface. |
1609 |
|
|
|
1610 |
|
|
@Test: |
1611 |
|
|
@@QName: createDocument.AtomEntryDocument.test |
1612 |
|
|
@@PerlDef: |
1613 |
|
|
my $impl; |
1614 |
|
|
__CODE{tc|createImplForTest:: $impl => $impl}__; |
1615 |
|
|
|
1616 |
|
|
my $doc = $impl-><M::c|DOMImplementation.createDocument> |
1617 |
|
|
(<Q::atom|>, 'entry'); |
1618 |
|
|
|
1619 |
|
|
$test->id ('interface'); |
1620 |
|
|
$test->assert_isa ($doc, <IFName::AtomEntryDocument>); |
1621 |
|
|
##AtomEntryDocument |
1622 |
|
|
|
1623 |
wakaba |
1.7 |
AGDef: |
1624 |
|
|
@QName: atomCommonAttributes |
1625 |
|
|
@enFN: common attributes |
1626 |
|
|
@mv:attributeTypeGroupName: common |
1627 |
wakaba |
1.13 |
|
1628 |
|
|
@mv:refers: Atom |
1629 |
wakaba |
1.7 |
|
1630 |
|
|
@ATDef: |
1631 |
|
|
@@mv:attributeTypeName: xml|base |
1632 |
|
|
@@mv:attributeValueType: atomUri |
1633 |
|
|
|
1634 |
|
|
@ATDef: |
1635 |
|
|
@@mv:attributeTypeName: xml|lang |
1636 |
|
|
@@mv:attributeValueType: atomLanguageTag |
1637 |
|
|
|
1638 |
wakaba |
1.8 |
@mv:refers: undefinedAttributes |
1639 |
wakaba |
1.7 |
##atomCommonAttributes |
1640 |
|
|
|
1641 |
|
|
STDef: |
1642 |
|
|
@QName: atomNCName |
1643 |
|
|
@mv:datatypeEntityName: NCName |
1644 |
|
|
#subsetOf: xsd|string |
1645 |
|
|
#minLength, pattern |
1646 |
|
|
|
1647 |
|
|
STDef: |
1648 |
|
|
@QName: atomMediaType |
1649 |
|
|
@mv:datatypeEntityName: MediaType |
1650 |
|
|
#subsetOf xsd|string |
1651 |
|
|
# pattern |
1652 |
|
|
|
1653 |
|
|
STDef: |
1654 |
|
|
@QName: atomLanguageTag |
1655 |
|
|
@mv:datatypeEntityName: LangaugeTag |
1656 |
|
|
#subsetOf: xsd|string |
1657 |
|
|
#pattern |
1658 |
|
|
|
1659 |
|
|
STDef: |
1660 |
|
|
@QName: atomUri |
1661 |
|
|
@mv:datatypeEntityName: URI |
1662 |
|
|
#aliasfor text |
1663 |
wakaba |
1.9 |
STCDef: |
1664 |
|
|
@QName: atomUriCM |
1665 |
|
|
@mv:elementContentModelName: URI |
1666 |
|
|
@cm: (dxm|PCDATA||ManakaiDOM|all)* |
1667 |
wakaba |
1.7 |
|
1668 |
|
|
STDef: |
1669 |
|
|
@QName: atomEmailAddress |
1670 |
|
|
@mv:datatypeEntityName: EmailAddress |
1671 |
|
|
#subsetOf xsd|string |
1672 |
|
|
#pattern |
1673 |
wakaba |
1.9 |
STCDef: |
1674 |
|
|
@QName: atomEmailAddressCM |
1675 |
|
|
@mv:elementContentModelName: EmailAddress |
1676 |
|
|
@cm: (dxm|PCDATA||ManakaiDOM|all)* |
1677 |
wakaba |
1.7 |
|
1678 |
|
|
ElementTypeBinding: |
1679 |
|
|
@Name: AGDef |
1680 |
|
|
@ElementType: |
1681 |
|
|
dis:ResourceDef |
1682 |
|
|
@ShadowContent: |
1683 |
|
|
@@DISCore:resourceType: mv|AttributeTypeGroup |
1684 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1685 |
|
|
|
1686 |
|
|
ElementTypeBinding: |
1687 |
|
|
@Name: ATDef |
1688 |
|
|
@ElementType: |
1689 |
|
|
dis:ResourceDef |
1690 |
|
|
@ShadowContent: |
1691 |
|
|
@@DISCore:resourceType: mv|AttributeType |
1692 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1693 |
|
|
|
1694 |
|
|
ElementTypeBinding: |
1695 |
wakaba |
1.8 |
@Name: ECDef |
1696 |
|
|
@ElementType: |
1697 |
|
|
dis:ResourceDef |
1698 |
|
|
@ShadowContent: |
1699 |
|
|
@@DISCore:resourceType: mv|ElementTypeClass |
1700 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1701 |
|
|
|
1702 |
|
|
ElementTypeBinding: |
1703 |
|
|
@Name: EMDef |
1704 |
|
|
@ElementType: |
1705 |
|
|
dis:ResourceDef |
1706 |
|
|
@ShadowContent: |
1707 |
|
|
@@DISCore:resourceType: mv|ElementTypeClassMix |
1708 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1709 |
|
|
|
1710 |
|
|
ElementTypeBinding: |
1711 |
wakaba |
1.7 |
@Name: STDef |
1712 |
|
|
@ElementType: |
1713 |
|
|
dis:ResourceDef |
1714 |
|
|
@ShadowContent: |
1715 |
|
|
@@DISCore:resourceType: mv|XMLDTDDatatypeEntity |
1716 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1717 |
|
|
|
1718 |
wakaba |
1.9 |
ElementTypeBinding: |
1719 |
|
|
@Name: STCDef |
1720 |
|
|
@ElementType: |
1721 |
|
|
dis:ResourceDef |
1722 |
|
|
@ShadowContent: |
1723 |
|
|
@@DISCore:resourceType: mv|ElementContentModel |
1724 |
|
|
@@For: =ManakaiDOM|ManakaiDOMLatest |
1725 |
|
|
|
1726 |
wakaba |
1.1 |
IFClsDef: |
1727 |
|
|
@IFQName: AtomElement |
1728 |
|
|
@ClsQName: ManakaiAtomElement |
1729 |
|
|
|
1730 |
|
|
@IFISA: Element |
1731 |
|
|
@ClsISA: te|ManakaiDOMElement |
1732 |
|
|
|
1733 |
|
|
@s:elementType: AnyAtomElement||ManakaiDOM|all |
1734 |
|
|
|
1735 |
|
|
@enDesc: |
1736 |
|
|
The <IF::AtomElement> interface provides convenience |
1737 |
|
|
methods and attributes for Atom elements. |
1738 |
|
|
|
1739 |
|
|
If the <Feature::fe|Atom> feature version <FeatureVer::1.0> |
1740 |
|
|
is supported, an <IF::Element> object whose namespace URI |
1741 |
|
|
is <URI^^DIS|QName::atom|> <kwd:MUST> also implement |
1742 |
|
|
the <IF::AtomElement> interface. Other <IF::Element> objects |
1743 |
|
|
<kwd:MAY> also implement the <IF::AtomElement> interface. |
1744 |
|
|
|
1745 |
|
|
@enImplNote: |
1746 |
|
|
@@ddid: todo |
1747 |
|
|
@@@: |
1748 |
|
|
{TODO:: |
1749 |
|
|
Need <CODE::xmllang> and <CODE::xmlbase> attributes |
1750 |
|
|
from SVG? |
1751 |
|
|
} |
1752 |
|
|
|
1753 |
|
|
@Test: |
1754 |
|
|
@@QName: AtomElement.interface.test |
1755 |
|
|
@@PerlDef: |
1756 |
|
|
for my $interface ( |
1757 |
|
|
<IFName::AtomElement>, |
1758 |
|
|
<IFName::AtomElement||ManakaiDOM|ManakaiDOM>, |
1759 |
|
|
<IFName::Element>, |
1760 |
|
|
<IFName::Node>, |
1761 |
|
|
<IFName::f|GetFeature>, |
1762 |
|
|
) { |
1763 |
|
|
$test->id ($interface); |
1764 |
|
|
$test->assert_true (<Class::ManakaiAtomElement>->isa ($interface)); |
1765 |
|
|
} |
1766 |
|
|
@Test: |
1767 |
|
|
@@QName: createElementNS.AtomElement.test |
1768 |
|
|
@@PerlDef: |
1769 |
|
|
my $doc; |
1770 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
1771 |
|
|
|
1772 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'unknown'); |
1773 |
|
|
$test->assert_isa ($el, <IFName::AtomElement>); |
1774 |
|
|
##AtomElement |
1775 |
|
|
|
1776 |
|
|
ResourceDef: |
1777 |
|
|
@QName: AnyAtomElement |
1778 |
|
|
@DISCore:resourceType: s|AnyElementInNS |
1779 |
|
|
@AppName: |
1780 |
|
|
@@@: atom|* |
1781 |
|
|
@@ContentType: DISCore|QName |
1782 |
|
|
@ForCheck: =ManakaiDOM|all |
1783 |
|
|
|
1784 |
wakaba |
1.9 |
ElementTypeBinding: |
1785 |
|
|
@Name: cm |
1786 |
|
|
@ElementType: |
1787 |
|
|
mv:elementContentModel |
1788 |
|
|
@ShadowContent: |
1789 |
|
|
@@ContentType: lang|dcmodel |
1790 |
|
|
|
1791 |
wakaba |
1.6 |
IFClsConstructDef: |
1792 |
wakaba |
1.1 |
@IFQName: AtomTextConstruct |
1793 |
|
|
@ClsQName: ManakaiAtomTextConstruct |
1794 |
wakaba |
1.6 |
@AGQName: TextAG |
1795 |
|
|
@AGName: text |
1796 |
|
|
@CMQName: TextCM |
1797 |
|
|
@CMName: text |
1798 |
wakaba |
1.1 |
|
1799 |
|
|
@IFISA: AtomElement |
1800 |
|
|
@ClsISA: ManakaiAtomElement |
1801 |
|
|
|
1802 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
1803 |
|
|
|
1804 |
wakaba |
1.9 |
@cm: |
1805 |
|
|
dxm|ANY||ManakaiDOM|all |
1806 |
|
|
@enImplNote: |
1807 |
|
|
@@ddid:cm |
1808 |
|
|
@@@: |
1809 |
|
|
{TODO:: |
1810 |
|
|
(dxm|PCDATA||ManakaiDOM|all | html|div)* |
1811 |
|
|
} |
1812 |
|
|
|
1813 |
wakaba |
1.1 |
@enDesc: |
1814 |
|
|
The <IF::AtomTextConstruct> interface provides convenience |
1815 |
|
|
methods and attributes for <IF::Element> nodes |
1816 |
|
|
classfied to the Text constructs. Other <IF::Element> |
1817 |
|
|
objects <kwd:MAY> also implement the <IF::AtomTextConstruct> |
1818 |
|
|
interface. |
1819 |
|
|
|
1820 |
|
|
A Text construct contains human-readable text, usually in |
1821 |
wakaba |
1.7 |
small quantities. The content of a Text construct is |
1822 |
wakaba |
1.1 |
Language-Sensitive. |
1823 |
|
|
|
1824 |
wakaba |
1.6 |
@ATTR: |
1825 |
wakaba |
1.1 |
@@Name: type |
1826 |
|
|
@@enDesc: |
1827 |
|
|
The <XA::type> attribute of the element. |
1828 |
|
|
|
1829 |
|
|
It <kwd:MUST> <I::reflect the string value |
1830 |
|
|
of the <XA::type> attribute> of the node. The |
1831 |
|
|
default value <kwd:MUST> be <CODE::text>. |
1832 |
|
|
@@Type: DOMString |
1833 |
|
|
@@Get: |
1834 |
|
|
@@@nullCase: |
1835 |
|
|
@@@@enDesc: |
1836 |
|
|
If the algorithm returns <DOM::null>. |
1837 |
|
|
@@@PerlDef: |
1838 |
|
|
__CODE{getReflectAttrStringValue:: |
1839 |
|
|
$node => $self, |
1840 |
|
|
$namespaceURI => {null}, |
1841 |
|
|
$localName => 'type', |
1842 |
|
|
$r => $r, |
1843 |
|
|
$defaultValue => 'text', |
1844 |
|
|
}__; |
1845 |
|
|
@@Set: |
1846 |
|
|
@@@nullCase: |
1847 |
|
|
@@@@enDesc: |
1848 |
|
|
Removes the attribute. |
1849 |
|
|
@@@NodeReadOnlyError: |
1850 |
|
|
@@@PerlDef: |
1851 |
|
|
__CODE{setReflectAttrStringValue:: |
1852 |
|
|
$node => $self, |
1853 |
|
|
$namespaceURI => {null}, |
1854 |
|
|
$localName => 'type', |
1855 |
|
|
$given => $given, |
1856 |
|
|
}__; |
1857 |
|
|
|
1858 |
|
|
@Attr: |
1859 |
|
|
@@Name: container |
1860 |
|
|
@@enDesc: |
1861 |
|
|
The container element that contains the actual content |
1862 |
|
|
of the construct. |
1863 |
|
|
@@Type: Element |
1864 |
|
|
@@Get: |
1865 |
|
|
@@@enDesc: |
1866 |
|
|
If the <A::AtomTextConstruct.type> is <CODE::xhtml>, |
1867 |
|
|
the getter <kwd:MUST> <I::return the <XE::html|div> child element>. |
1868 |
|
|
Otherwise, the object itself <kwd:MUST> be returned. |
1869 |
|
|
@@@nullCase: |
1870 |
|
|
@@@@enDesc: |
1871 |
|
|
If the <A::AtomTextConstruct.type> is <CODE::xhtml> |
1872 |
|
|
and the algorithm returns <DOM::null>. |
1873 |
|
|
@@@NodeReadOnlyError: |
1874 |
|
|
@@@PerlDef: |
1875 |
|
|
__DEEP{ |
1876 |
|
|
my $type = $self-><AG::AtomTextConstruct.type>; |
1877 |
|
|
if ($type eq 'xhtml') { |
1878 |
|
|
__CODE{returnChildElement:: |
1879 |
|
|
$node => $self, |
1880 |
|
|
$namespaceURI => {<Q::html|>}, |
1881 |
|
|
$localName => 'div', |
1882 |
|
|
$r => $r, |
1883 |
|
|
}__; |
1884 |
|
|
} else { |
1885 |
|
|
$r = $self; |
1886 |
|
|
} |
1887 |
|
|
}__; |
1888 |
|
|
|
1889 |
|
|
@@Test: |
1890 |
|
|
@@@QName: AtomTextConstruct.container.test |
1891 |
|
|
@@@PerlDef: |
1892 |
|
|
my $doc; |
1893 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
1894 |
|
|
|
1895 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'title'); |
1896 |
|
|
|
1897 |
|
|
$test->id ('no'); |
1898 |
|
|
$test->assert_equals ($el-><AG::AtomTextConstruct.container>, $el); |
1899 |
|
|
|
1900 |
|
|
$test->id ('text'); |
1901 |
|
|
$el-><AS::AtomTextConstruct.type> ('text'); |
1902 |
|
|
$test->assert_equals ($el-><AG::AtomTextConstruct.container>, $el); |
1903 |
|
|
|
1904 |
|
|
$test->id ('html'); |
1905 |
|
|
$el-><AS::AtomTextConstruct.type> ('html'); |
1906 |
|
|
$test->assert_equals ($el-><AG::AtomTextConstruct.container>, $el); |
1907 |
|
|
|
1908 |
|
|
$test->id ('xhtml'); |
1909 |
|
|
$el-><AS::AtomTextConstruct.type> ('xhtml'); |
1910 |
|
|
$test->assert_null ($el-><AG::AtomTextConstruct.container>); |
1911 |
|
|
|
1912 |
|
|
$doc-><AG::Document.domConfig> |
1913 |
|
|
-><M::CFG.setParameter> (<Q::cfg|create-child-element> => true); |
1914 |
|
|
my $con = $el-><AG::AtomTextConstruct.container>; |
1915 |
|
|
|
1916 |
|
|
$test->id ('xhtml.create'); |
1917 |
|
|
$test->assert_not_equals ($con, $el); |
1918 |
|
|
|
1919 |
|
|
$test->id ('xhtml.namespaceURI'); |
1920 |
|
|
$test->assert_equals ($con-><AG::Node.namespaceURI>, <Q::html|>); |
1921 |
|
|
|
1922 |
|
|
$test->id ('xhtml.localName'); |
1923 |
|
|
$test->assert_equals ($con-><AG::Node.localName>, 'div'); |
1924 |
|
|
|
1925 |
|
|
$test->id ('xhtml.parentNode'); |
1926 |
|
|
$test->assert_equals ($con-><AG::Node.parentNode>, $el); |
1927 |
|
|
|
1928 |
|
|
$test->id ('xhtml.2'); |
1929 |
|
|
$test->assert_equals ($el-><AG::AtomTextConstruct.container>, $con); |
1930 |
|
|
##AtomTextConstruct |
1931 |
|
|
|
1932 |
wakaba |
1.6 |
IFClsConstructDef: |
1933 |
wakaba |
1.1 |
@IFQName: AtomPersonConstruct |
1934 |
|
|
@ClsQName: ManakaiAtomPersonConstruct |
1935 |
wakaba |
1.6 |
@AGQName: PersonAG |
1936 |
|
|
@AGName: person |
1937 |
|
|
@CMQName: PersonCM |
1938 |
|
|
@CMName: person |
1939 |
wakaba |
1.1 |
|
1940 |
|
|
@IFISA: AtomElement |
1941 |
|
|
@ClsISA: ManakaiAtomElement |
1942 |
|
|
|
1943 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
1944 |
|
|
|
1945 |
wakaba |
1.9 |
@cm: |
1946 |
|
|
(person-prop+) |
1947 |
|
|
|
1948 |
wakaba |
1.1 |
@enDesc: |
1949 |
|
|
The <IF::AtomPersonConstruct> interface provides convenience |
1950 |
|
|
methods and attributes for <IF::Element> nodes |
1951 |
|
|
classfied to the Person constructs. Other <IF::Element> |
1952 |
|
|
objects <kwd:MAY> also implement the <IF::AtomPersonConstruct> |
1953 |
|
|
interface. |
1954 |
|
|
|
1955 |
|
|
A Person construct is an element that describes a person, |
1956 |
|
|
corporation, or similar entity. |
1957 |
|
|
|
1958 |
|
|
@Attr: |
1959 |
|
|
@@Name: name |
1960 |
|
|
@@enDesc: |
1961 |
|
|
The <XE::atom|name> value of the feed. |
1962 |
|
|
|
1963 |
|
|
It <kwd:MUST> <I::reflect the string value |
1964 |
|
|
of the <XE::atom|name> child element> of the node. |
1965 |
|
|
@@Type: DOMString |
1966 |
|
|
@@Get: |
1967 |
|
|
@@@nullCase: |
1968 |
|
|
@@@@enDesc: |
1969 |
|
|
If the algorithm returns <DOM::null>. |
1970 |
|
|
@@@NodeReadOnlyError: |
1971 |
|
|
@@@PerlDef: |
1972 |
|
|
__CODE{getReflectStringValue:: |
1973 |
|
|
$node => $self, |
1974 |
|
|
$namespaceURI => {<Q::atom|>}, |
1975 |
|
|
$localName => 'name', |
1976 |
|
|
$r => $r, |
1977 |
|
|
}__; |
1978 |
|
|
@@Set: |
1979 |
|
|
@@@nullCase: |
1980 |
|
|
@@@@enDesc: |
1981 |
|
|
Removes the value. |
1982 |
|
|
@@@NodeReadOnlyError: |
1983 |
|
|
@@@PerlDef: |
1984 |
|
|
__CODE{setReflectStringValue:: |
1985 |
|
|
$node => $self, |
1986 |
|
|
$namespaceURI => {<Q::atom|>}, |
1987 |
|
|
$localName => 'name', |
1988 |
|
|
$given => $given, |
1989 |
|
|
}__; |
1990 |
|
|
|
1991 |
|
|
@Attr: |
1992 |
|
|
@@Name: nameElement |
1993 |
|
|
@@enDesc: |
1994 |
|
|
The <XE::atom|name> child element of the node. |
1995 |
wakaba |
1.7 |
@@Type: AtomNameElement |
1996 |
wakaba |
1.1 |
@@Get: |
1997 |
|
|
@@@enDesc: |
1998 |
|
|
It <kwd:MUST> <I::return a <XE::atom|name> child element> |
1999 |
|
|
of the node. |
2000 |
|
|
@@@nullCase: |
2001 |
|
|
@@@@enDesc: |
2002 |
|
|
If the algorithm returns <DOM::null>. |
2003 |
|
|
@@@NodeReadOnlyError: |
2004 |
|
|
@@@PerlDef: |
2005 |
|
|
__CODE{returnChildElement:: |
2006 |
|
|
$node => $self, |
2007 |
|
|
$namespaceURI => {<Q::atom|>}, |
2008 |
|
|
$localName => 'name', |
2009 |
|
|
$r => $r, |
2010 |
|
|
}__; |
2011 |
|
|
|
2012 |
|
|
@Attr: |
2013 |
|
|
@@Name: uri |
2014 |
|
|
@@enDesc: |
2015 |
|
|
The <XE::atom|uri> value of the feed. |
2016 |
|
|
|
2017 |
|
|
It <kwd:MUST> <I::reflect the URI value |
2018 |
|
|
of the <XE::atom|uri> child element> of the node. |
2019 |
|
|
@@Type: DOMString |
2020 |
|
|
@@actualType: DOMURI |
2021 |
|
|
@@Get: |
2022 |
|
|
@@@nullCase: |
2023 |
|
|
@@@@enDesc: |
2024 |
|
|
If the algorithm returns <DOM::null>. |
2025 |
|
|
@@@NodeReadOnlyError: |
2026 |
|
|
@@@PerlDef: |
2027 |
|
|
__CODE{getReflectURIValue:: |
2028 |
|
|
$node => $self, |
2029 |
|
|
$namespaceURI => {<Q::atom|>}, |
2030 |
|
|
$localName => 'uri', |
2031 |
|
|
$r => $r, |
2032 |
|
|
}__; |
2033 |
|
|
@@Set: |
2034 |
|
|
@@@nullCase: |
2035 |
|
|
@@@@enDesc: |
2036 |
|
|
Removes the value. |
2037 |
|
|
@@@NodeReadOnlyError: |
2038 |
|
|
@@@PerlDef: |
2039 |
|
|
__CODE{setReflectURIValue:: |
2040 |
|
|
$node => $self, |
2041 |
|
|
$namespaceURI => {<Q::atom|>}, |
2042 |
|
|
$localName => 'uri', |
2043 |
|
|
$given => $given, |
2044 |
|
|
}__; |
2045 |
|
|
|
2046 |
|
|
@Attr: |
2047 |
|
|
@@Name: email |
2048 |
|
|
@@enDesc: |
2049 |
|
|
The <XE::atom|email> value of the feed. |
2050 |
|
|
|
2051 |
|
|
It <kwd:MUST> <I::reflect the string value |
2052 |
|
|
of the <XE::atom|email> child element> of the node. |
2053 |
|
|
@@Type: DOMString |
2054 |
|
|
@@Get: |
2055 |
|
|
@@@nullCase: |
2056 |
|
|
@@@@enDesc: |
2057 |
|
|
If the algorithm returns <DOM::null>. |
2058 |
|
|
@@@NodeReadOnlyError: |
2059 |
|
|
@@@PerlDef: |
2060 |
|
|
__CODE{getReflectStringValue:: |
2061 |
|
|
$node => $self, |
2062 |
|
|
$namespaceURI => {<Q::atom|>}, |
2063 |
|
|
$localName => 'email', |
2064 |
|
|
$r => $r, |
2065 |
|
|
}__; |
2066 |
|
|
@@Set: |
2067 |
|
|
@@@nullCase: |
2068 |
|
|
@@@@enDesc: |
2069 |
|
|
Removes the value. |
2070 |
|
|
@@@NodeReadOnlyError: |
2071 |
|
|
@@@PerlDef: |
2072 |
|
|
__CODE{setReflectStringValue:: |
2073 |
|
|
$node => $self, |
2074 |
|
|
$namespaceURI => {<Q::atom|>}, |
2075 |
|
|
$localName => 'email', |
2076 |
|
|
$given => $given, |
2077 |
|
|
}__; |
2078 |
|
|
##AtomPersonConstruct |
2079 |
|
|
|
2080 |
wakaba |
1.8 |
ECDef: |
2081 |
|
|
@QName: person-prop |
2082 |
|
|
@mv:elementTypeClassName: person-prop |
2083 |
|
|
@mv:refers: atom|name |
2084 |
|
|
@mv:refers: atom|uri |
2085 |
|
|
@mv:refers: atom|email |
2086 |
|
|
@mv:refers: extensionElements |
2087 |
|
|
|
2088 |
wakaba |
1.6 |
IFClsConstructDef: |
2089 |
wakaba |
1.1 |
@IFQName: AtomDateConstruct |
2090 |
|
|
@ClsQName: ManakaiAtomDateConstruct |
2091 |
wakaba |
1.6 |
@AGQName: DateAG |
2092 |
|
|
@AGName: date |
2093 |
|
|
@CMQName: DateCM |
2094 |
|
|
@CMName: date |
2095 |
wakaba |
1.1 |
|
2096 |
|
|
@IFISA: AtomElement |
2097 |
|
|
@ClsISA: ManakaiAtomElement |
2098 |
|
|
|
2099 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
2100 |
|
|
|
2101 |
wakaba |
1.9 |
@cm: |
2102 |
|
|
(dxm|PCDATA||ManakaiDOM|all)* |
2103 |
|
|
@enImplNote: |
2104 |
|
|
@@ddid: cm |
2105 |
|
|
@@@: |
2106 |
|
|
{TODO:: |
2107 |
|
|
xsd|dateTime |
2108 |
|
|
} |
2109 |
|
|
|
2110 |
wakaba |
1.1 |
@enDesc: |
2111 |
|
|
The <IF::AtomDateConstruct> interface provides convenience |
2112 |
|
|
methods and attributes for <IF::Element> nodes |
2113 |
|
|
classfied to the Date constructs. Other <IF::Element> |
2114 |
|
|
objects <kwd:MAY> also implement the <IF::AtomDateConstruct> |
2115 |
|
|
interface. |
2116 |
|
|
|
2117 |
|
|
A Date construct is an element whose content is a date that |
2118 |
|
|
conforms to the uppercase version of the RFC 3339 format. |
2119 |
|
|
|
2120 |
|
|
@Attr: |
2121 |
|
|
@@Name: value |
2122 |
|
|
@@enDesc: |
2123 |
|
|
The date value of the node. |
2124 |
|
|
|
2125 |
|
|
{ISSUE:: |
2126 |
|
|
|
2127 |
|
|
- Out of range of platform DOMTimeStamp type |
2128 |
|
|
|
2129 |
|
|
- Errorous xsd:dateTime |
2130 |
|
|
|
2131 |
|
|
- Leap seconds |
2132 |
|
|
|
2133 |
|
|
- Timezone |
2134 |
|
|
|
2135 |
|
|
- Precision |
2136 |
|
|
|
2137 |
|
|
} |
2138 |
|
|
@@Type: DOMTimeStamp |
2139 |
|
|
@@Get: |
2140 |
|
|
@@@enDesc: |
2141 |
|
|
{TODO:: Define |
2142 |
|
|
} |
2143 |
|
|
@@@PerlDef: |
2144 |
|
|
my $value = $self-><AG::Node.textContent>; |
2145 |
|
|
if ($value =~ /\A(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(\.\d+)? |
2146 |
|
|
(?:Z|([+-]\d+):(\d+))\z/x) { |
2147 |
|
|
require Time::Local; |
2148 |
|
|
$r = Time::Local::timegm_nocheck |
2149 |
|
|
($6, defined $8 ? $8 > 0 ? $5 - $9 : $5 + $9 : $5, |
2150 |
|
|
defined $8 ? $4 - $8 : $4, $3, $2-1, $1-1900); |
2151 |
|
|
$r += "0$7" if defined $7; |
2152 |
|
|
} else { |
2153 |
|
|
$r = 0; |
2154 |
|
|
} |
2155 |
|
|
@@Set: |
2156 |
|
|
@@@enDesc: |
2157 |
|
|
{TODO:: Define |
2158 |
|
|
} |
2159 |
|
|
@@@NodeReadOnlyError: |
2160 |
|
|
@@@PerlDef: |
2161 |
|
|
__DEEP{ |
2162 |
|
|
my @value = gmtime (int ($given / 1)); |
2163 |
|
|
my $value = sprintf '%04d-%02d-%02dT%02d:%02d:%02d', |
2164 |
|
|
$value[5] + 1900, $value[4] + 1, |
2165 |
|
|
$value[3], $value[2], $value[1], $value[0]; |
2166 |
|
|
my $f = $given % 1; |
2167 |
|
|
$value .= substr (''.$f, 1) if $f; |
2168 |
|
|
$value .= 'Z'; |
2169 |
|
|
$self-><AS::Node.textContent> ($value); |
2170 |
|
|
}__; |
2171 |
|
|
|
2172 |
|
|
@enImplNote: |
2173 |
|
|
@@ddid: todo |
2174 |
|
|
@@@: |
2175 |
|
|
{TODO:: |
2176 |
|
|
Access to components, especially timezone and -00:00. |
2177 |
|
|
} |
2178 |
|
|
##AtomDateConstruct |
2179 |
|
|
|
2180 |
wakaba |
1.8 |
ECDef: |
2181 |
|
|
@QName: feed-prop |
2182 |
|
|
@mv:elementTypeClassName: feed-prop |
2183 |
|
|
@mv:refers: atom|author |
2184 |
|
|
@mv:refers: atom|category |
2185 |
|
|
@mv:refers: atom|contributor |
2186 |
|
|
@mv:refers: atom|generator |
2187 |
|
|
@mv:refers: atom|icon |
2188 |
|
|
@mv:refers: atom|id |
2189 |
|
|
@mv:refers: atom|link |
2190 |
|
|
@mv:refers: atom|logo |
2191 |
|
|
@mv:refers: atom|rights |
2192 |
|
|
@mv:refers: atom|subtitle |
2193 |
|
|
@mv:refers: atom|title |
2194 |
|
|
@mv:refers: atom|updated |
2195 |
|
|
@mv:refers: extensionElements |
2196 |
|
|
|
2197 |
wakaba |
1.1 |
IFClsETDef: |
2198 |
|
|
@IFQName: AtomFeedElement |
2199 |
|
|
@ETQName: atom|feed |
2200 |
|
|
@ETRQName: atom|feed |
2201 |
|
|
@ClsQName: ManakaiAtomFeedElement |
2202 |
|
|
|
2203 |
|
|
@IFISA: AtomElement |
2204 |
|
|
@ClsISA: ManakaiAtomElement |
2205 |
|
|
|
2206 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
2207 |
|
|
|
2208 |
wakaba |
1.9 |
@cm: |
2209 |
|
|
(feed-prop+, atom|entry*) |
2210 |
|
|
|
2211 |
wakaba |
1.1 |
@enDesc: |
2212 |
|
|
The <XE::atom|feed> element is the document element |
2213 |
|
|
of an Atom Feed Document. |
2214 |
wakaba |
1.3 |
|
2215 |
|
|
{ISSUE:: |
2216 |
|
|
<XE::atom|entry> children <kwd:MUST> be placed after |
2217 |
|
|
any other elements. Attributes creating children |
2218 |
|
|
should insert them before any entries? |
2219 |
|
|
} |
2220 |
wakaba |
1.1 |
|
2221 |
|
|
@Attr: |
2222 |
|
|
@@Name: authorElements |
2223 |
|
|
@@enDesc: |
2224 |
|
|
A static list of <XE::atom|author> child elements of the node. |
2225 |
|
|
@@Type: StaticNodeList |
2226 |
|
|
@@Get: |
2227 |
|
|
@@@enDesc: |
2228 |
|
|
It <kwd:MUST> <I::return a <XE::atom|author> child element list> |
2229 |
|
|
of the node. |
2230 |
|
|
@@@PerlDef: |
2231 |
|
|
__CODE{returnChildElementList:: |
2232 |
|
|
$node => $self, |
2233 |
|
|
$namespaceURI => {<Q::atom|>}, |
2234 |
|
|
$localName => 'author', |
2235 |
|
|
$r => $r, |
2236 |
|
|
}__; |
2237 |
|
|
|
2238 |
|
|
@@Test: |
2239 |
|
|
@@@QName: AtomFeedElement.authorElements.empty.test |
2240 |
|
|
@@@PerlDef: |
2241 |
|
|
my $doc; |
2242 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2243 |
|
|
|
2244 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2245 |
|
|
|
2246 |
|
|
my $list = $el-><AG::AtomFeedElement.authorElements>; |
2247 |
|
|
|
2248 |
|
|
$test->id ('interface'); |
2249 |
|
|
$test->assert_isa ($list, <IFName::StaticNodeList>); |
2250 |
|
|
|
2251 |
|
|
$test->id ('length'); |
2252 |
|
|
$test->assert_num_equals |
2253 |
|
|
(actual_value => 0+@{$list}, expected_value => 0); |
2254 |
|
|
|
2255 |
|
|
$test->id ('readOnly'); |
2256 |
|
|
$test->assert_false ($list-><AG::NodeList.manakaiReadOnly>); |
2257 |
|
|
@@Test: |
2258 |
|
|
@@@QName: AtomFeedElement.authorElements.two.test |
2259 |
|
|
@@@PerlDef: |
2260 |
|
|
my $doc; |
2261 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2262 |
|
|
|
2263 |
|
|
my $e1 = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2264 |
|
|
my $a1 = $doc-><M::Document.createElementNS> (<Q::atom|>, 'author'); |
2265 |
|
|
$e1-><M::Node.appendChild> ($a1); |
2266 |
|
|
my $a2 = $doc-><M::Document.createElementNS> (<Q::atom|>, 'author'); |
2267 |
|
|
$e1-><M::Node.appendChild> ($a2); |
2268 |
|
|
|
2269 |
|
|
my $list = $e1-><AG::AtomFeedElement.authorElements>; |
2270 |
|
|
my $a3 = $doc-><M::Document.createElementNS> (<Q::atom|>, 'author'); |
2271 |
|
|
$e1-><M::Node.appendChild> ($a3); |
2272 |
|
|
|
2273 |
|
|
$test->id ('length'); |
2274 |
|
|
$test->assert_num_equals |
2275 |
|
|
(actual_value => 0+@{$list}, expected_value => 2); |
2276 |
|
|
|
2277 |
|
|
$test->id (0); |
2278 |
|
|
$test->assert_equals ($list->[0], $a1); |
2279 |
|
|
|
2280 |
|
|
$test->id (1); |
2281 |
|
|
$test->assert_equals ($list->[1], $a2); |
2282 |
|
|
|
2283 |
|
|
@Attr: |
2284 |
|
|
@@Name: categoryElements |
2285 |
|
|
@@enDesc: |
2286 |
|
|
A static list of <XE::atom|category> child elements of the node. |
2287 |
|
|
@@Type: StaticNodeList |
2288 |
|
|
@@Get: |
2289 |
|
|
@@@enDesc: |
2290 |
|
|
It <kwd:MUST> <I::return a <XE::atom|category> child element list> |
2291 |
|
|
of the node. |
2292 |
|
|
@@@PerlDef: |
2293 |
|
|
__CODE{returnChildElementList:: |
2294 |
|
|
$node => $self, |
2295 |
|
|
$namespaceURI => {<Q::atom|>}, |
2296 |
|
|
$localName => 'category', |
2297 |
|
|
$r => $r, |
2298 |
|
|
}__; |
2299 |
|
|
|
2300 |
|
|
@Attr: |
2301 |
|
|
@@Name: contributorElements |
2302 |
|
|
@@enDesc: |
2303 |
|
|
A static list of <XE::atom|contributor> child elements of the node. |
2304 |
|
|
@@Type: StaticNodeList |
2305 |
|
|
@@Get: |
2306 |
|
|
@@@enDesc: |
2307 |
|
|
It <kwd:MUST> <I::return a <XE::atom|contributor> child element list> |
2308 |
|
|
of the node. |
2309 |
|
|
@@@PerlDef: |
2310 |
|
|
__CODE{returnChildElementList:: |
2311 |
|
|
$node => $self, |
2312 |
|
|
$namespaceURI => {<Q::atom|>}, |
2313 |
|
|
$localName => 'contributor', |
2314 |
|
|
$r => $r, |
2315 |
|
|
}__; |
2316 |
|
|
|
2317 |
|
|
@Attr: |
2318 |
|
|
@@Name: generatorElement |
2319 |
|
|
@@enDesc: |
2320 |
|
|
The <XE::atom|generator> child element of the node. |
2321 |
|
|
@@Type: AtomGeneratorElement |
2322 |
|
|
@@Get: |
2323 |
|
|
@@@enDesc: |
2324 |
|
|
It <kwd:MUST> <I::return a <XE::atom|generator> child element> |
2325 |
|
|
of the node. |
2326 |
|
|
@@@nullCase: |
2327 |
|
|
@@@@enDesc: |
2328 |
|
|
If the algorithm returns <DOM::null>. |
2329 |
|
|
@@@NodeReadOnlyError: |
2330 |
|
|
@@@PerlDef: |
2331 |
|
|
__CODE{returnChildElement:: |
2332 |
|
|
$node => $self, |
2333 |
|
|
$namespaceURI => {<Q::atom|>}, |
2334 |
|
|
$localName => 'generator', |
2335 |
|
|
$r => $r, |
2336 |
|
|
}__; |
2337 |
|
|
|
2338 |
|
|
@@Test: |
2339 |
|
|
@@@QName: AtomFeedElement.generatorElement.test |
2340 |
|
|
@@@PerlDef: |
2341 |
|
|
my $doc; |
2342 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2343 |
|
|
|
2344 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2345 |
|
|
|
2346 |
|
|
$test->id ('no'); |
2347 |
|
|
$test->assert_null ($el-><AG::AtomFeedElement.generatorElement>); |
2348 |
|
|
|
2349 |
|
|
$doc-><AG::Document.domConfig> |
2350 |
|
|
-><M::CFG.setParameter> (<Q::cfg|create-child-element> => true); |
2351 |
|
|
my $ge = $el-><AG::AtomFeedElement.generatorElement>; |
2352 |
|
|
|
2353 |
|
|
$test->id ('create.interface'); |
2354 |
|
|
$test->assert_isa ($ge, <IFName::Element>); |
2355 |
|
|
|
2356 |
|
|
$test->id ('create.namespaceURI'); |
2357 |
|
|
$test->assert_equals ($ge-><AG::Node.namespaceURI>, <Q::atom|>); |
2358 |
|
|
|
2359 |
|
|
$test->id ('create.localName'); |
2360 |
|
|
$test->assert_equals ($ge-><AG::Node.localName>, 'generator'); |
2361 |
|
|
|
2362 |
|
|
$test->id ('has'); |
2363 |
|
|
my $ge2 = $el-><AG::AtomFeedElement.generatorElement>; |
2364 |
|
|
$test->assert_equals ($ge2, $ge); |
2365 |
|
|
|
2366 |
|
|
$test->id ('multiple'); |
2367 |
|
|
$el-><M::Node.appendChild> |
2368 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'generator')); |
2369 |
|
|
my $ge3 = $el-><AG::AtomFeedElement.generatorElement>; |
2370 |
|
|
$test->assert_equals ($ge3, $ge); |
2371 |
|
|
|
2372 |
|
|
@Attr: |
2373 |
|
|
@@Name: icon |
2374 |
|
|
@@enDesc: |
2375 |
|
|
The <XE::atom|icon> value of the feed. |
2376 |
|
|
|
2377 |
|
|
It <kwd:MUST> <I::reflect the URI value |
2378 |
|
|
of the <XE::atom|icon> child element> of the node. |
2379 |
|
|
@@Type: DOMString |
2380 |
|
|
@@actualType: DOMURI |
2381 |
|
|
@@Get: |
2382 |
|
|
@@@nullCase: |
2383 |
|
|
@@@@enDesc: |
2384 |
|
|
If the algorithm returns <DOM::null>. |
2385 |
|
|
@@@NodeReadOnlyError: |
2386 |
|
|
@@@PerlDef: |
2387 |
|
|
__CODE{getReflectURIValue:: |
2388 |
|
|
$node => $self, |
2389 |
|
|
$namespaceURI => {<Q::atom|>}, |
2390 |
|
|
$localName => 'icon', |
2391 |
|
|
$r => $r, |
2392 |
|
|
}__; |
2393 |
|
|
@@Set: |
2394 |
|
|
@@@nullCase: |
2395 |
|
|
@@@@enDesc: |
2396 |
|
|
Removes the value. |
2397 |
|
|
@@@NodeReadOnlyError: |
2398 |
|
|
@@@PerlDef: |
2399 |
|
|
__CODE{setReflectURIValue:: |
2400 |
|
|
$node => $self, |
2401 |
|
|
$namespaceURI => {<Q::atom|>}, |
2402 |
|
|
$localName => 'icon', |
2403 |
|
|
$given => $given, |
2404 |
|
|
}__; |
2405 |
|
|
|
2406 |
|
|
@@Test: |
2407 |
|
|
@@@QName: AtomFeedElement.icon.test |
2408 |
|
|
@@@PerlDef: |
2409 |
|
|
my $doc; |
2410 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2411 |
|
|
|
2412 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2413 |
|
|
|
2414 |
|
|
$test->id ('default'); |
2415 |
|
|
$test->assert_null ($el-><AG::AtomFeedElement.icon>); |
2416 |
|
|
|
2417 |
|
|
$test->id ('set'); |
2418 |
|
|
$el-><AS::AtomFeedElement.icon> ('http://example.com/'); |
2419 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.icon>, |
2420 |
|
|
'http://example.com/'); |
2421 |
|
|
|
2422 |
|
|
$test->id ('relative'); |
2423 |
|
|
$el-><AS::AtomFeedElement.icon> ('favicon.ico'); |
2424 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.icon>, |
2425 |
|
|
'favicon.ico'); |
2426 |
|
|
|
2427 |
|
|
$test->id ('relative.base'); |
2428 |
|
|
$el-><M::Element.setAttributeNS> (<Q::xml:>, 'xml:base', |
2429 |
|
|
'http://www.example.com/'); |
2430 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.icon>, |
2431 |
|
|
'http://www.example.com/favicon.ico'); |
2432 |
|
|
|
2433 |
|
|
$test->id ('multiple'); |
2434 |
|
|
$el-><M::Node.appendChild> |
2435 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'icon')) |
2436 |
|
|
-><AS::Node.textContent> ('/default.ico'); # ignored |
2437 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.icon>, |
2438 |
|
|
'http://www.example.com/favicon.ico'); |
2439 |
|
|
|
2440 |
|
|
$test->id ('remove'); |
2441 |
|
|
$el-><AS::AtomFeedElement.icon> (null); |
2442 |
|
|
$test->assert_null ($el-><AG::AtomFeedElement.icon>); |
2443 |
|
|
|
2444 |
|
|
@Attr: |
2445 |
|
|
@@Name: id |
2446 |
|
|
@@enDesc: |
2447 |
|
|
The <XE::atom|id> value of the feed. |
2448 |
|
|
|
2449 |
|
|
It <kwd:MUST> <I::reflect the string value |
2450 |
|
|
of the <XE::atom|id> child element> of the node. |
2451 |
|
|
@@Type: DOMString |
2452 |
|
|
@@actualType: DOMURI |
2453 |
|
|
@@Get: |
2454 |
|
|
@@@nullCase: |
2455 |
|
|
@@@@enDesc: |
2456 |
|
|
If the algorithm returns <DOM::null>. |
2457 |
|
|
@@@NodeReadOnlyError: |
2458 |
|
|
@@@PerlDef: |
2459 |
|
|
__CODE{getReflectStringValue:: |
2460 |
|
|
$node => $self, |
2461 |
|
|
$namespaceURI => {<Q::atom|>}, |
2462 |
|
|
$localName => 'id', |
2463 |
|
|
$r => $r, |
2464 |
|
|
}__; |
2465 |
|
|
@@Set: |
2466 |
|
|
@@@nullCase: |
2467 |
|
|
@@@@enDesc: |
2468 |
|
|
Removes the value. |
2469 |
|
|
@@@NodeReadOnlyError: |
2470 |
|
|
@@@PerlDef: |
2471 |
|
|
__CODE{setReflectStringValue:: |
2472 |
|
|
$node => $self, |
2473 |
|
|
$namespaceURI => {<Q::atom|>}, |
2474 |
|
|
$localName => 'id', |
2475 |
|
|
$given => $given, |
2476 |
|
|
}__; |
2477 |
|
|
|
2478 |
|
|
@@Test: |
2479 |
|
|
@@@QName: AtomFeedElement.id.test |
2480 |
|
|
@@@PerlDef: |
2481 |
|
|
my $doc; |
2482 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2483 |
|
|
|
2484 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2485 |
|
|
|
2486 |
|
|
$test->id ('default'); |
2487 |
|
|
$test->assert_null ($el-><AG::AtomFeedElement.id>); |
2488 |
|
|
|
2489 |
|
|
$test->id ('set'); |
2490 |
|
|
$el-><AS::AtomFeedElement.id> ('http://example.com/'); |
2491 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.id>, |
2492 |
|
|
'http://example.com/'); |
2493 |
|
|
|
2494 |
|
|
$test->id ('relative'); |
2495 |
|
|
$el-><AS::AtomFeedElement.id> ('favicon.ico'); |
2496 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.id>, |
2497 |
|
|
'favicon.ico'); |
2498 |
|
|
|
2499 |
|
|
$test->id ('relative.base'); |
2500 |
|
|
$el-><M::Element.setAttributeNS> (<Q::xml:>, 'xml:base', |
2501 |
|
|
'http://www.example.com/'); |
2502 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.id>, |
2503 |
|
|
'favicon.ico'); |
2504 |
|
|
|
2505 |
|
|
$test->id ('multiple'); |
2506 |
|
|
$el-><M::Node.appendChild> |
2507 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'id')) |
2508 |
|
|
-><AS::Node.textContent> ('/default.ico'); # ignored |
2509 |
|
|
$test->assert_equals ($el-><AG::AtomFeedElement.id>, |
2510 |
|
|
'favicon.ico'); |
2511 |
|
|
|
2512 |
|
|
$test->id ('remove'); |
2513 |
|
|
$el-><AS::AtomFeedElement.id> (null); |
2514 |
|
|
$test->assert_null ($el-><AG::AtomFeedElement.id>); |
2515 |
|
|
|
2516 |
|
|
@Attr: |
2517 |
|
|
@@Name: linkElements |
2518 |
|
|
@@enDesc: |
2519 |
|
|
A static list of <XE::atom|link> child elements of the node. |
2520 |
|
|
@@Type: StaticNodeList |
2521 |
|
|
@@Get: |
2522 |
|
|
@@@enDesc: |
2523 |
|
|
It <kwd:MUST> <I::return a <XE::atom|link> child element list> |
2524 |
|
|
of the node. |
2525 |
|
|
@@@PerlDef: |
2526 |
|
|
__CODE{returnChildElementList:: |
2527 |
|
|
$node => $self, |
2528 |
|
|
$namespaceURI => {<Q::atom|>}, |
2529 |
|
|
$localName => 'link', |
2530 |
|
|
$r => $r, |
2531 |
|
|
}__; |
2532 |
|
|
|
2533 |
|
|
@Attr: |
2534 |
|
|
@@Name: logo |
2535 |
|
|
@@enDesc: |
2536 |
|
|
The <XE::atom|logo> value of the feed. |
2537 |
|
|
|
2538 |
|
|
It <kwd:MUST> <I::reflect the URI value |
2539 |
|
|
of the <XE::atom|logo> child element> of the node. |
2540 |
|
|
@@Type: DOMString |
2541 |
|
|
@@actualType: DOMURI |
2542 |
|
|
@@Get: |
2543 |
|
|
@@@nullCase: |
2544 |
|
|
@@@@enDesc: |
2545 |
|
|
If the algorithm returns <DOM::null>. |
2546 |
|
|
@@@NodeReadOnlyError: |
2547 |
|
|
@@@PerlDef: |
2548 |
|
|
__CODE{getReflectURIValue:: |
2549 |
|
|
$node => $self, |
2550 |
|
|
$namespaceURI => {<Q::atom|>}, |
2551 |
|
|
$localName => 'logo', |
2552 |
|
|
$r => $r, |
2553 |
|
|
}__; |
2554 |
|
|
@@Set: |
2555 |
|
|
@@@nullCase: |
2556 |
|
|
@@@@enDesc: |
2557 |
|
|
Removes the value. |
2558 |
|
|
@@@NodeReadOnlyError: |
2559 |
|
|
@@@PerlDef: |
2560 |
|
|
__CODE{setReflectURIValue:: |
2561 |
|
|
$node => $self, |
2562 |
|
|
$namespaceURI => {<Q::atom|>}, |
2563 |
|
|
$localName => 'logo', |
2564 |
|
|
$given => $given, |
2565 |
|
|
}__; |
2566 |
|
|
|
2567 |
|
|
@Attr: |
2568 |
|
|
@@Name: rightsElement |
2569 |
|
|
@@enDesc: |
2570 |
|
|
The <XE::atom|rights> child element of the node. |
2571 |
|
|
@@Type: AtomRightsElement |
2572 |
|
|
@@Get: |
2573 |
|
|
@@@enDesc: |
2574 |
|
|
It <kwd:MUST> <I::return a <XE::atom|rights> child element> |
2575 |
|
|
of the node. |
2576 |
|
|
@@@nullCase: |
2577 |
|
|
@@@@enDesc: |
2578 |
|
|
If the algorithm returns <DOM::null>. |
2579 |
|
|
@@@NodeReadOnlyError: |
2580 |
|
|
@@@PerlDef: |
2581 |
|
|
__CODE{returnChildElement:: |
2582 |
|
|
$node => $self, |
2583 |
|
|
$namespaceURI => {<Q::atom|>}, |
2584 |
|
|
$localName => 'rights', |
2585 |
|
|
$r => $r, |
2586 |
|
|
}__; |
2587 |
|
|
|
2588 |
|
|
@Attr: |
2589 |
|
|
@@Name: subtitleElement |
2590 |
|
|
@@enDesc: |
2591 |
|
|
The <XE::atom|subtitle> child element of the node. |
2592 |
|
|
@@Type: AtomSubtitleElement |
2593 |
|
|
@@Get: |
2594 |
|
|
@@@enDesc: |
2595 |
|
|
It <kwd:MUST> <I::return a <XE::atom|subtitle> child element> |
2596 |
|
|
of the node. |
2597 |
|
|
@@@nullCase: |
2598 |
|
|
@@@@enDesc: |
2599 |
|
|
If the algorithm returns <DOM::null>. |
2600 |
|
|
@@@NodeReadOnlyError: |
2601 |
|
|
@@@PerlDef: |
2602 |
|
|
__CODE{returnChildElement:: |
2603 |
|
|
$node => $self, |
2604 |
|
|
$namespaceURI => {<Q::atom|>}, |
2605 |
|
|
$localName => 'subtitle', |
2606 |
|
|
$r => $r, |
2607 |
|
|
}__; |
2608 |
|
|
|
2609 |
|
|
@Attr: |
2610 |
|
|
@@Name: titleElement |
2611 |
|
|
@@enDesc: |
2612 |
|
|
The <XE::atom|title> child element of the node. |
2613 |
|
|
@@Type: AtomTitleElement |
2614 |
|
|
@@Get: |
2615 |
|
|
@@@enDesc: |
2616 |
|
|
It <kwd:MUST> <I::return a <XE::atom|title> child element> |
2617 |
|
|
of the node. |
2618 |
|
|
@@@nullCase: |
2619 |
|
|
@@@@enDesc: |
2620 |
|
|
If the algorithm returns <DOM::null>. |
2621 |
|
|
@@@NodeReadOnlyError: |
2622 |
|
|
@@@PerlDef: |
2623 |
|
|
__CODE{returnChildElement:: |
2624 |
|
|
$node => $self, |
2625 |
|
|
$namespaceURI => {<Q::atom|>}, |
2626 |
|
|
$localName => 'title', |
2627 |
|
|
$r => $r, |
2628 |
|
|
}__; |
2629 |
|
|
|
2630 |
|
|
@Attr: |
2631 |
|
|
@@Name: updatedElement |
2632 |
|
|
@@enDesc: |
2633 |
|
|
The <XE::atom|updated> child element of the node. |
2634 |
|
|
@@Type: AtomUpdatedElement |
2635 |
|
|
@@Get: |
2636 |
|
|
@@@enDesc: |
2637 |
|
|
It <kwd:MUST> <I::return a <XE::atom|updated> child element> |
2638 |
|
|
of the node. |
2639 |
|
|
@@@nullCase: |
2640 |
|
|
@@@@enDesc: |
2641 |
|
|
If the algorithm returns <DOM::null>. |
2642 |
|
|
@@@NodeReadOnlyError: |
2643 |
|
|
@@@PerlDef: |
2644 |
|
|
__CODE{returnChildElement:: |
2645 |
|
|
$node => $self, |
2646 |
|
|
$namespaceURI => {<Q::atom|>}, |
2647 |
|
|
$localName => 'updated', |
2648 |
|
|
$r => $r, |
2649 |
|
|
}__; |
2650 |
|
|
|
2651 |
|
|
@Attr: |
2652 |
|
|
@@Name: entryElements |
2653 |
|
|
@@enDesc: |
2654 |
|
|
A static list of <XE::atom|entry> child elements of the node. |
2655 |
|
|
@@Type: StaticNodeList |
2656 |
|
|
@@Get: |
2657 |
|
|
@@@enDesc: |
2658 |
|
|
It <kwd:MUST> <I::return a <XE::atom|entry> child element list> |
2659 |
|
|
of the node. |
2660 |
|
|
@@@PerlDef: |
2661 |
|
|
__CODE{returnChildElementList:: |
2662 |
|
|
$node => $self, |
2663 |
|
|
$namespaceURI => {<Q::atom|>}, |
2664 |
|
|
$localName => 'entry', |
2665 |
|
|
$r => $r, |
2666 |
|
|
}__; |
2667 |
|
|
|
2668 |
|
|
@Method: |
2669 |
|
|
@@Name: getEntryElementById |
2670 |
|
|
@@enDesc: |
2671 |
|
|
Returns an <XE::atom|entry> node selected by its <XE::atom|id>. |
2672 |
|
|
@@Param: |
2673 |
|
|
@@@Name: idArg |
2674 |
|
|
@@@Type: DOMString |
2675 |
|
|
@@@actualType: DOMURI |
2676 |
|
|
@@@enDesc: |
2677 |
|
|
The identifier of the entry. |
2678 |
|
|
@@Return: |
2679 |
|
|
@@@Type: AtomEntryElement |
2680 |
|
|
@@@enDesc: |
2681 |
|
|
The <XE::atom|entry> element whose identifier equals to |
2682 |
|
|
<P::id>. |
2683 |
|
|
|
2684 |
|
|
It <kwd:MUST> return the first child element node in document |
2685 |
|
|
order whose element type is <XE::atom|entry> and |
2686 |
|
|
whose first child element node in document order |
2687 |
|
|
with element type <XE::atom|id> has <A::Node.textContent> |
2688 |
|
|
equals to <P::id>, if any, or <DOM::null>. |
2689 |
|
|
@@@nullCase: |
2690 |
|
|
@@@@enDesc: |
2691 |
|
|
If no matching element. |
2692 |
|
|
@@@PerlDef: |
2693 |
|
|
E: { |
2694 |
|
|
no warnings 'uninitialized'; |
2695 |
|
|
for my $cn (@{$self-><AG::Node.childNodes>}) { |
2696 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
2697 |
|
|
$cn-><AG::Node.localName> eq 'entry' and |
2698 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
2699 |
|
|
if ($cn-><AG::AtomEntryElement.id> eq $idArg) { |
2700 |
|
|
$r = $cn; |
2701 |
|
|
last E; |
2702 |
|
|
} |
2703 |
|
|
} |
2704 |
|
|
} |
2705 |
|
|
} # E |
2706 |
|
|
|
2707 |
|
|
@Method: |
2708 |
|
|
@@Name: addNewEntry |
2709 |
|
|
@@enDesc: |
2710 |
|
|
Creates an <XA::atom|entry> element node and |
2711 |
|
|
appends to the node. |
2712 |
|
|
@@Param: |
2713 |
|
|
@@@Name: id |
2714 |
|
|
@@@Type: DOMString |
2715 |
|
|
@@@actualType: DOMURI |
2716 |
|
|
@@@enDesc: |
2717 |
|
|
The <XE::atom|id> of the entry. |
2718 |
|
|
@@Param: |
2719 |
|
|
@@@Name: title |
2720 |
|
|
@@@Type: DOMString |
2721 |
|
|
@@@enDesc: |
2722 |
|
|
The <XE::atom|title> of the entry. |
2723 |
|
|
@@@nullCase: |
2724 |
|
|
@@@@enDesc: |
2725 |
|
|
The implementation <kwd:MUST> treate <DOM::null> |
2726 |
|
|
as if an empty string is specified. |
2727 |
|
|
@@Param: |
2728 |
|
|
@@@Name: lang |
2729 |
|
|
@@@Type: DOMString |
2730 |
|
|
@@@enDesc: |
2731 |
|
|
The natural language of the entry. |
2732 |
|
|
@@@nullCase: |
2733 |
|
|
@@@@enDesc: |
2734 |
|
|
No explicit language specification is added. |
2735 |
|
|
@@Return: |
2736 |
|
|
@@@Type: AtomEntryElement |
2737 |
|
|
@@@enDesc: |
2738 |
|
|
The newly created <XE::atom|entry> element. |
2739 |
|
|
|
2740 |
|
|
{P:: The newly created <XE::atom|entry> element node <kwd:MUST> |
2741 |
|
|
have attributes set as: |
2742 |
|
|
|
2743 |
|
|
- <A::Node.attributes>::: A <IF::NamedNodeMap> that contains |
2744 |
|
|
at least a new <XA::xml|lang> |
2745 |
|
|
attribute node except when |
2746 |
|
|
the <P::lang> parameter is set |
2747 |
|
|
to <DOM::null>. |
2748 |
|
|
|
2749 |
|
|
- <A::Node.childNodes>::: A <IF::NodeList> containing |
2750 |
|
|
a new <XE::atom|id> element node, |
2751 |
|
|
a new <XE::atom|title> element node, and |
2752 |
|
|
a new <XE::atom|updated> element node |
2753 |
|
|
in any order. |
2754 |
|
|
|
2755 |
|
|
} |
2756 |
|
|
|
2757 |
|
|
This element node <kwd:MUST> be appended to the node |
2758 |
|
|
as if the <M::Node.appendChild> method were invoked |
2759 |
|
|
on the node and <kwd:MUST> be returned by the method. |
2760 |
|
|
Note that an exception might be thrown during this course. |
2761 |
|
|
|
2762 |
|
|
{P:: The <XA::xml|lang> attribute node, if created, <kwd:MUST> |
2763 |
|
|
have attributes set as: |
2764 |
|
|
|
2765 |
|
|
- <A::Node.nodeValue>::: <P::lang>. |
2766 |
|
|
|
2767 |
|
|
- <A::Attr.specified>::: <DOM::true>. |
2768 |
|
|
|
2769 |
|
|
} |
2770 |
|
|
|
2771 |
|
|
{P:: The newly created <XE::atom|id> element node <kwd:MUST> |
2772 |
|
|
have attributes set as: |
2773 |
|
|
|
2774 |
|
|
- <A::Node.textContent>::: <P::id>. |
2775 |
|
|
|
2776 |
|
|
} |
2777 |
|
|
|
2778 |
|
|
{P:: The newly created <XE::atom|title> element node <kwd:MUST> |
2779 |
|
|
have attributes set as: |
2780 |
|
|
|
2781 |
|
|
- <A::Node.textContent>::: <P::title>. |
2782 |
|
|
|
2783 |
|
|
} |
2784 |
|
|
|
2785 |
|
|
The <XA::type> attribute node <kwd:MUST-NOT> be attached |
2786 |
|
|
to the <XE::atom|title> element node. |
2787 |
|
|
|
2788 |
|
|
{P:: The newly created <XE::atom|updated> element node <kwd:MUST> |
2789 |
|
|
have attributes set as: |
2790 |
|
|
|
2791 |
|
|
- <A::Node.textContent>::: A uppercase RFC 3339 <CODE::date-time> |
2792 |
|
|
representation of the time when the method is invoked. |
2793 |
|
|
The implementation <kwd:MAY> align its timezone to |
2794 |
|
|
that of the environment in which the method is invoked. |
2795 |
|
|
|
2796 |
|
|
} |
2797 |
|
|
@@@PerlDef: |
2798 |
|
|
__DEEP{ |
2799 |
|
|
my $od = $self-><AG::Node.ownerDocument>; |
2800 |
|
|
|
2801 |
|
|
$r = $od-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
2802 |
|
|
$r-><AS::Node.manakaiLanguage> ($lang) if defined $lang; |
2803 |
|
|
|
2804 |
|
|
$r-><AS::AtomFeedElement.id> ($id); |
2805 |
|
|
|
2806 |
|
|
my $titlee = $od-><M::Document.createElementNS> (<Q::atom|>, 'title'); |
2807 |
|
|
$titlee-><AS::Node.textContent> (defined $title ? $title : ''); |
2808 |
|
|
$r-><M::Node.appendChild> ($titlee); |
2809 |
|
|
|
2810 |
|
|
my $updatede = $od-><M::Document.createElementNS> |
2811 |
|
|
(<Q::atom|>, 'updated'); |
2812 |
|
|
$updatede-><AS::AtomDateConstruct.value> (scalar time); |
2813 |
|
|
$r-><M::Node.appendChild> ($updatede); |
2814 |
wakaba |
1.12 |
|
2815 |
|
|
$self-><M::Node.appendChild> ($r); |
2816 |
wakaba |
1.1 |
}__; |
2817 |
|
|
|
2818 |
|
|
@@Test: |
2819 |
|
|
@@@QName: AtomFeedElement.addNewEntry.1.test |
2820 |
|
|
@@@PerlDef: |
2821 |
|
|
my $doc; |
2822 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2823 |
|
|
|
2824 |
|
|
my $feed = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2825 |
|
|
|
2826 |
|
|
my $ent = $feed-><M::AtomFeedElement.addNewEntry> |
2827 |
|
|
('about:id', 'entry title', 'en'); |
2828 |
|
|
|
2829 |
|
|
$test->id ('entry.interface'); |
2830 |
|
|
$test->assert_isa ($ent, <IFName::AtomEntryElement>); |
2831 |
|
|
|
2832 |
|
|
$test->id ('entry.namespaceURI'); |
2833 |
|
|
$test->assert_equals ($ent-><AG::Node.namespaceURI>, <Q::atom|>); |
2834 |
|
|
|
2835 |
|
|
$test->id ('entry.localName'); |
2836 |
|
|
$test->assert_equals ($ent-><AG::Node.localName>, 'entry'); |
2837 |
|
|
|
2838 |
|
|
$test->id ('entry.lang'); |
2839 |
|
|
$test->assert_equals ($ent-><M::Element.getAttributeNS> |
2840 |
|
|
(<Q::xml|>, 'lang'), |
2841 |
|
|
'en'); |
2842 |
|
|
|
2843 |
|
|
my $id; |
2844 |
|
|
my $title; |
2845 |
|
|
my $updated; |
2846 |
|
|
|
2847 |
|
|
for my $cn (@{$ent-><AG::Node.childNodes>}) { |
2848 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
2849 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
2850 |
|
|
if ($cn-><AG::Node.localName> eq 'id') { |
2851 |
|
|
$id = $cn; |
2852 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'title') { |
2853 |
|
|
$title = $cn; |
2854 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'updated') { |
2855 |
|
|
$updated = $cn; |
2856 |
|
|
} |
2857 |
|
|
} |
2858 |
|
|
} |
2859 |
|
|
|
2860 |
|
|
$test->id ('id'); |
2861 |
|
|
$test->assert_not_null ($id); |
2862 |
|
|
|
2863 |
|
|
$test->id ('id.value'); |
2864 |
|
|
$test->assert_equals ($id-><AG::Node.textContent>, 'about:id'); |
2865 |
|
|
|
2866 |
|
|
$test->id ('title'); |
2867 |
|
|
$test->assert_not_null ($title); |
2868 |
|
|
|
2869 |
|
|
$test->id ('title.value'); |
2870 |
|
|
$test->assert_equals ($title-><AG::Node.textContent>, 'entry title'); |
2871 |
|
|
|
2872 |
|
|
$test->id ('title.type'); |
2873 |
|
|
$test->assert_null ($title-><M::Element.getAttributeNS> (null, 'type')); |
2874 |
|
|
|
2875 |
|
|
$test->id ('updated'); |
2876 |
|
|
$test->assert_not_null ($updated); |
2877 |
|
|
|
2878 |
|
|
$test->id ('updated.value'); |
2879 |
|
|
$test->assert_num_not_equals |
2880 |
|
|
(actual_value => $updated-><AG::AtomDateConstruct.value>, |
2881 |
|
|
expected_value => 0); |
2882 |
wakaba |
1.12 |
|
2883 |
|
|
$test->id ('parent'); |
2884 |
|
|
$test->assert_equals ($ent-><AG::Node.parentNode>, $feed); |
2885 |
wakaba |
1.1 |
@@Test: |
2886 |
|
|
@@@QName: AtomFeedElement.addNewEntry.2.test |
2887 |
|
|
@@@enDesc: |
2888 |
|
|
<DOM::null> <CODE::lang>. |
2889 |
|
|
@@@PerlDef: |
2890 |
|
|
my $doc; |
2891 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
2892 |
|
|
|
2893 |
|
|
my $feed = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
2894 |
|
|
|
2895 |
|
|
my $ent = $feed-><M::AtomFeedElement.addNewEntry> |
2896 |
|
|
('about:id', 'entry title', null); |
2897 |
|
|
|
2898 |
|
|
$test->id ('entry.lang'); |
2899 |
|
|
$test->assert_null ($ent-><M::Element.getAttributeNS> |
2900 |
|
|
(<Q::xml|>, 'lang')); |
2901 |
|
|
##AtomFeedElement |
2902 |
|
|
|
2903 |
wakaba |
1.8 |
ECDef: |
2904 |
|
|
@QName: entry-prop |
2905 |
|
|
@mv:elementTypeClassName: entry-prop |
2906 |
|
|
@mv:refers: atom|author |
2907 |
|
|
@mv:refers: atom|category |
2908 |
|
|
@mv:refers: atom|content |
2909 |
|
|
@mv:refers: atom|contributor |
2910 |
|
|
@mv:refers: atom|id |
2911 |
|
|
@mv:refers: atom|link |
2912 |
|
|
@mv:refers: atom|published |
2913 |
|
|
@mv:refers: atom|rights |
2914 |
|
|
@mv:refers: atom|source |
2915 |
|
|
@mv:refers: atom|summary |
2916 |
|
|
@mv:refers: atom|title |
2917 |
|
|
@mv:refers: atom|updated |
2918 |
|
|
@mv:refers: extensionElements |
2919 |
|
|
|
2920 |
wakaba |
1.1 |
IFClsETDef: |
2921 |
|
|
@IFQName: AtomEntryElement |
2922 |
|
|
@ETQName: atom|entry |
2923 |
|
|
@ETRQName: atom|entry |
2924 |
|
|
@ClsQName: ManakaiAtomEntryElement |
2925 |
|
|
|
2926 |
|
|
@IFISA: AtomElement |
2927 |
|
|
@ClsISA: ManakaiAtomElement |
2928 |
|
|
|
2929 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
2930 |
|
|
|
2931 |
wakaba |
1.9 |
@cm: |
2932 |
|
|
(entry-prop+) |
2933 |
|
|
|
2934 |
wakaba |
1.1 |
@enDesc: |
2935 |
|
|
The <XE::atom|entry> element represents an individual |
2936 |
|
|
entry, acting as a container for metadata and data |
2937 |
|
|
associated with the entry. |
2938 |
|
|
|
2939 |
|
|
@Attr: |
2940 |
|
|
@@Name: authorElements |
2941 |
|
|
@@enDesc: |
2942 |
|
|
A static list of <XE::atom|author> child elements of the node. |
2943 |
|
|
@@Type: StaticNodeList |
2944 |
|
|
@@Get: |
2945 |
|
|
@@@enDesc: |
2946 |
|
|
It <kwd:MUST> <I::return a <XE::atom|author> child element list> |
2947 |
|
|
of the node. |
2948 |
|
|
@@@disDef: |
2949 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.authorElements.get |
2950 |
|
|
|
2951 |
|
|
@Attr: |
2952 |
|
|
@@Name: entryAuthorElements |
2953 |
|
|
@@enDesc: |
2954 |
|
|
A static list of <XE::atom|author> elements for the node. |
2955 |
|
|
@@Type: StaticNodeList |
2956 |
|
|
@@Get: |
2957 |
|
|
@@@enDesc: |
2958 |
|
|
= If the node contains one or more <XE::atom|author> |
2959 |
|
|
element node in its child node list, then it |
2960 |
|
|
<kwd:MUST> return a <IF::StaticNodeList> that |
2961 |
|
|
would be returned by the <A::AtomEntryElement.authorElements> |
2962 |
|
|
attribute of the node. |
2963 |
|
|
|
2964 |
|
|
= Otherwise, if the node contains a <XE::atom|source> |
2965 |
|
|
element node in its child node list, then it |
2966 |
|
|
<kwd:MUST> return a <IF::StaticNodeList> that |
2967 |
|
|
would be returned by the <A::AtomSourceElement.authorElements> |
2968 |
|
|
attribute of that node, unless its <A::NodeList.length> |
2969 |
|
|
is zero. |
2970 |
|
|
|
2971 |
|
|
= Otherwise, if the <A::Node.parentNode> of the |
2972 |
|
|
node is a <XE::atom|feed> element node, then |
2973 |
|
|
it <kwd:MUST> return a <IF::StaticNodeList> that |
2974 |
|
|
would be returned by the <A::AtomFeedElement.authorElements> |
2975 |
|
|
attribute of that node. |
2976 |
|
|
|
2977 |
|
|
= Otherwise, it <kwd:MUST> return a <IF::StaticNodeList> |
2978 |
|
|
whose <A::NodeList.length> is zero. |
2979 |
|
|
@@@PerlDef: |
2980 |
|
|
__DEEP{ |
2981 |
|
|
E: { |
2982 |
|
|
no warnings 'uninitialized'; |
2983 |
|
|
__CODE{tc|createStaticNodeList:: $r => $r}__; |
2984 |
|
|
|
2985 |
|
|
my $source; |
2986 |
|
|
for my $cn (@{$self-><AG::Node.childNodes>}) { |
2987 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
2988 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
2989 |
|
|
if ($cn-><AG::Node.localName> eq 'author') { |
2990 |
|
|
push @{$r}, $cn; |
2991 |
|
|
} elsif ($cn-><AG::Node.localName> eq 'source') { |
2992 |
|
|
$source = $cn; |
2993 |
|
|
} |
2994 |
|
|
} |
2995 |
|
|
} |
2996 |
|
|
last E unless @{$r} == 0; |
2997 |
|
|
|
2998 |
|
|
if (defined $source) { |
2999 |
|
|
$r = $source-><AG::AtomSourceElement.authorElements>; |
3000 |
|
|
} |
3001 |
|
|
last E unless @{$r} == 0; |
3002 |
|
|
|
3003 |
|
|
my $parent = $self-><AG::Node.parentNode>; |
3004 |
|
|
if (defined $parent and |
3005 |
|
|
$parent-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
3006 |
|
|
$parent-><AG::Node.namespaceURI> eq <Q::atom|> and |
3007 |
|
|
$parent-><AG::Node.localName> eq 'feed') { |
3008 |
|
|
$r = $parent-><AG::AtomFeedElement.authorElements>; |
3009 |
|
|
} |
3010 |
|
|
} # E |
3011 |
|
|
}__; |
3012 |
|
|
|
3013 |
|
|
@@Test: |
3014 |
|
|
@@@QName: AtomEntryElement.entryAuthorElements.1.test |
3015 |
|
|
@@@PerlDef: |
3016 |
|
|
my $doc; |
3017 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3018 |
|
|
|
3019 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3020 |
|
|
|
3021 |
|
|
|
3022 |
|
|
$test->id ('empty'); |
3023 |
|
|
my $list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3024 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 0); |
3025 |
|
|
|
3026 |
|
|
$test->id ('one'); |
3027 |
|
|
$el-><M::Node.appendChild> |
3028 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3029 |
|
|
$list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3030 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); |
3031 |
|
|
|
3032 |
|
|
$test->id ('source'); |
3033 |
|
|
for ($el-><M::Node.appendChild> |
3034 |
|
|
($doc-><M::Document.createElementNS> |
3035 |
|
|
(<Q::atom|>, 'source'))) { |
3036 |
|
|
$_-><M::Node.appendChild> |
3037 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3038 |
|
|
$_-><M::Node.appendChild> |
3039 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3040 |
|
|
} |
3041 |
|
|
$list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3042 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); |
3043 |
|
|
|
3044 |
|
|
$test->id ('parent'); |
3045 |
|
|
for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) { |
3046 |
|
|
$_-><M::Node.appendChild> |
3047 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3048 |
|
|
$_-><M::Node.appendChild> |
3049 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3050 |
|
|
$_-><M::Node.appendChild> |
3051 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3052 |
|
|
$_-><M::Node.appendChild> ($el); |
3053 |
|
|
} |
3054 |
|
|
$list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3055 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); |
3056 |
|
|
@@Test: |
3057 |
|
|
@@@QName: AtomEntryElement.entryAuthorElements.2.test |
3058 |
|
|
@@@PerlDef: |
3059 |
|
|
my $doc; |
3060 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3061 |
|
|
|
3062 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3063 |
|
|
|
3064 |
|
|
$test->id ('source'); |
3065 |
|
|
for ($el-><M::Node.appendChild> |
3066 |
|
|
($doc-><M::Document.createElementNS> |
3067 |
|
|
(<Q::atom|>, 'source'))) { |
3068 |
|
|
$_-><M::Node.appendChild> |
3069 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3070 |
|
|
$_-><M::Node.appendChild> |
3071 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3072 |
|
|
} |
3073 |
|
|
my $list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3074 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 2); |
3075 |
|
|
|
3076 |
|
|
$test->id ('parent'); |
3077 |
|
|
for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) { |
3078 |
|
|
$_-><M::Node.appendChild> |
3079 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3080 |
|
|
$_-><M::Node.appendChild> |
3081 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3082 |
|
|
$_-><M::Node.appendChild> |
3083 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3084 |
|
|
$_-><M::Node.appendChild> ($el); |
3085 |
|
|
} |
3086 |
|
|
$list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3087 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 2); |
3088 |
|
|
@@Test: |
3089 |
|
|
@@@QName: AtomEntryElement.entryAuthorElements.3.test |
3090 |
|
|
@@@PerlDef: |
3091 |
|
|
my $doc; |
3092 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3093 |
|
|
|
3094 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3095 |
|
|
|
3096 |
|
|
$test->id ('source'); |
3097 |
|
|
for ($el-><M::Node.appendChild> |
3098 |
|
|
($doc-><M::Document.createElementNS> |
3099 |
|
|
(<Q::atom|>, 'source'))) { |
3100 |
|
|
# empty |
3101 |
|
|
} |
3102 |
|
|
my $list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3103 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 0); |
3104 |
|
|
|
3105 |
|
|
$test->id ('parent'); |
3106 |
|
|
for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) { |
3107 |
|
|
$_-><M::Node.appendChild> |
3108 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3109 |
|
|
$_-><M::Node.appendChild> |
3110 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3111 |
|
|
$_-><M::Node.appendChild> |
3112 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3113 |
|
|
$_-><M::Node.appendChild> ($el); |
3114 |
|
|
} |
3115 |
|
|
$list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3116 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 3); |
3117 |
|
|
@@Test: |
3118 |
|
|
@@@QName: AtomEntryElement.entryAuthorElements.4.test |
3119 |
|
|
@@@PerlDef: |
3120 |
|
|
my $doc; |
3121 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3122 |
|
|
|
3123 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3124 |
|
|
|
3125 |
|
|
$test->id ('parent'); |
3126 |
|
|
for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) { |
3127 |
|
|
$_-><M::Node.appendChild> |
3128 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3129 |
|
|
$_-><M::Node.appendChild> |
3130 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3131 |
|
|
$_-><M::Node.appendChild> |
3132 |
|
|
($doc-><M::Document.createElementNS> (<Q::atom|>, 'author')); |
3133 |
|
|
$_-><M::Node.appendChild> ($el); |
3134 |
|
|
} |
3135 |
|
|
my $list = $el-><AG::AtomEntryElement.entryAuthorElements>; |
3136 |
|
|
$test->assert_num_equals (actual_value => 0+@$list, expected_value => 3); |
3137 |
|
|
|
3138 |
|
|
@Attr: |
3139 |
|
|
@@Name: categoryElements |
3140 |
|
|
@@enDesc: |
3141 |
|
|
A static list of <XE::atom|category> child elements of the node. |
3142 |
|
|
@@Type: StaticNodeList |
3143 |
|
|
@@Get: |
3144 |
|
|
@@@enDesc: |
3145 |
|
|
It <kwd:MUST> <I::return a <XE::atom|category> child element list> |
3146 |
|
|
of the node. |
3147 |
|
|
@@@disDef: |
3148 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.categoryElements.get |
3149 |
wakaba |
1.2 |
|
3150 |
|
|
@Attr: |
3151 |
|
|
@@Name: contentElement |
3152 |
|
|
@@enDesc: |
3153 |
|
|
The <XE::atom|content> child element of the node. |
3154 |
|
|
@@Type: AtomContentElement |
3155 |
|
|
@@Get: |
3156 |
|
|
@@@enDesc: |
3157 |
|
|
It <kwd:MUST> <I::return a <XE::atom|content> child element> |
3158 |
|
|
of the node. |
3159 |
|
|
@@@nullCase: |
3160 |
|
|
@@@@enDesc: |
3161 |
|
|
If the algorithm returns <DOM::null>. |
3162 |
|
|
@@@NodeReadOnlyError: |
3163 |
|
|
@@@PerlDef: |
3164 |
|
|
__CODE{returnChildElement:: |
3165 |
|
|
$node => $self, |
3166 |
|
|
$namespaceURI => {<Q::atom|>}, |
3167 |
|
|
$localName => 'content', |
3168 |
|
|
$r => $r, |
3169 |
|
|
}__; |
3170 |
wakaba |
1.1 |
|
3171 |
|
|
@Attr: |
3172 |
|
|
@@Name: contributorElements |
3173 |
|
|
@@enDesc: |
3174 |
|
|
A static list of <XE::atom|contributor> child elements of the node. |
3175 |
|
|
@@Type: StaticNodeList |
3176 |
|
|
@@Get: |
3177 |
|
|
@@@enDesc: |
3178 |
|
|
It <kwd:MUST> <I::return a <XE::atom|contributor> child element list> |
3179 |
|
|
of the node. |
3180 |
|
|
@@@disDef: |
3181 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.contributorElements.get |
3182 |
|
|
|
3183 |
|
|
@Attr: |
3184 |
|
|
@@Name: id |
3185 |
|
|
@@enDesc: |
3186 |
|
|
The <XE::atom|id> value of the feed. |
3187 |
|
|
|
3188 |
|
|
It <kwd:MUST> <I::reflect the string value |
3189 |
|
|
of the <XE::atom|id> child element> of the node. |
3190 |
|
|
@@Type: DOMString |
3191 |
|
|
@@actualType: DOMURI |
3192 |
|
|
@@Get: |
3193 |
|
|
@@@nullCase: |
3194 |
|
|
@@@@enDesc: |
3195 |
|
|
If the algorithm returns <DOM::null>. |
3196 |
|
|
@@@NodeReadOnlyError: |
3197 |
|
|
@@@disDef: |
3198 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.id.get |
3199 |
|
|
@@Set: |
3200 |
|
|
@@@nullCase: |
3201 |
|
|
@@@@enDesc: |
3202 |
|
|
Removes the value. |
3203 |
|
|
@@@NodeReadOnlyError: |
3204 |
|
|
@@@disDef: |
3205 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.id.set |
3206 |
|
|
|
3207 |
|
|
@Attr: |
3208 |
|
|
@@Name: linkElements |
3209 |
|
|
@@enDesc: |
3210 |
|
|
A static list of <XE::atom|link> child elements of the node. |
3211 |
|
|
@@Type: StaticNodeList |
3212 |
|
|
@@Get: |
3213 |
|
|
@@@enDesc: |
3214 |
|
|
It <kwd:MUST> <I::return a <XE::atom|link> child element list> |
3215 |
|
|
of the node. |
3216 |
|
|
@@@disDef: |
3217 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.linkElements.get |
3218 |
|
|
|
3219 |
|
|
@Attr: |
3220 |
|
|
@@Name: publishedElement |
3221 |
|
|
@@enDesc: |
3222 |
|
|
The <XE::atom|published> child element of the node. |
3223 |
|
|
@@Type: AtomPublishedElement |
3224 |
|
|
@@Get: |
3225 |
|
|
@@@enDesc: |
3226 |
|
|
It <kwd:MUST> <I::return a <XE::atom|published> child element> |
3227 |
|
|
of the node. |
3228 |
|
|
@@@nullCase: |
3229 |
|
|
@@@@enDesc: |
3230 |
|
|
If the algorithm returns <DOM::null>. |
3231 |
|
|
@@@NodeReadOnlyError: |
3232 |
|
|
@@@PerlDef: |
3233 |
|
|
__CODE{returnChildElement:: |
3234 |
|
|
$node => $self, |
3235 |
|
|
$namespaceURI => {<Q::atom|>}, |
3236 |
|
|
$localName => 'published', |
3237 |
|
|
$r => $r, |
3238 |
|
|
}__; |
3239 |
|
|
|
3240 |
|
|
@Attr: |
3241 |
|
|
@@Name: rightsElement |
3242 |
|
|
@@enDesc: |
3243 |
|
|
The <XE::atom|rights> child element of the node. |
3244 |
|
|
@@Type: AtomRightsElement |
3245 |
|
|
@@Get: |
3246 |
|
|
@@@enDesc: |
3247 |
|
|
It <kwd:MUST> <I::return a <XE::atom|rights> child element> |
3248 |
|
|
of the node. |
3249 |
|
|
@@@nullCase: |
3250 |
|
|
@@@@enDesc: |
3251 |
|
|
If the algorithm returns <DOM::null>. |
3252 |
|
|
@@@NodeReadOnlyError: |
3253 |
|
|
@@@disDef: |
3254 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.rightsElement.get |
3255 |
|
|
|
3256 |
|
|
@Attr: |
3257 |
|
|
@@Name: entryRightsElement |
3258 |
|
|
@@enDesc: |
3259 |
|
|
The <XE::atom|rights> element for the node. |
3260 |
|
|
@@Type: AtomRightsElement |
3261 |
|
|
@@Get: |
3262 |
|
|
@@@enDesc: |
3263 |
|
|
= If the node contains a <XE::atom|rights> |
3264 |
|
|
element node in its child node list, then it |
3265 |
|
|
<kwd:MUST> return the first such a node in document order. |
3266 |
|
|
|
3267 |
|
|
= Otherwise, if the <A::Node.parentNode> of the |
3268 |
|
|
node is a <XE::atom|feed> element node, then |
3269 |
|
|
it <kwd:MUST> return an <IF::AtomRightsElement> |
3270 |
|
|
that would be returned by the <A::AtomFeedElement.rightsElement> |
3271 |
|
|
attribute of that node, except when it is <DOM::null>. |
3272 |
|
|
|
3273 |
|
|
{OLI:: Otherwise, |
3274 |
|
|
|
3275 |
|
|
{OLI:: If the <cfg::cfg|create-child-element> configuration |
3276 |
|
|
parameter is set to <DOM::true>, |
3277 |
|
|
|
3278 |
|
|
= Create an element node <VAR::N> whose element type |
3279 |
|
|
is <XE::atom|rights>. |
3280 |
|
|
|
3281 |
|
|
= Append <VAR::N> to this node as if the <M::Node.appendChild> |
3282 |
|
|
method were called for the node with its parameter |
3283 |
|
|
set to <VAR::N>. Note that this might throw an exception. |
3284 |
|
|
|
3285 |
|
|
= Then, <VAR::N> <kwd:MUST> be returned. |
3286 |
|
|
|
3287 |
|
|
} |
3288 |
|
|
|
3289 |
|
|
= Otherwise, it <kwd:MUST> return <DOM::null>. |
3290 |
|
|
} |
3291 |
|
|
@@@nullCase: |
3292 |
|
|
@@@@enDesc: |
3293 |
|
|
If the algorithm returns <DOM::null>. |
3294 |
|
|
@@@NodeReadOnlyError: |
3295 |
|
|
@@@PerlDef: |
3296 |
|
|
__DEEP{ |
3297 |
|
|
E: { |
3298 |
|
|
no warnings 'uninitialized'; |
3299 |
|
|
for my $cn (@{$self-><AG::Node.childNodes>}) { |
3300 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
3301 |
|
|
$cn-><AG::Node.localName> eq 'rights' and |
3302 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
3303 |
|
|
$r = $cn; |
3304 |
|
|
last E; |
3305 |
|
|
} |
3306 |
|
|
} |
3307 |
|
|
|
3308 |
|
|
my $parent = $self-><AG::Node.parentNode>; |
3309 |
|
|
if (defined $parent and |
3310 |
|
|
$parent-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
3311 |
|
|
$parent-><AG::Node.namespaceURI> eq <Q::atom|> and |
3312 |
|
|
$parent-><AG::Node.localName> eq 'feed') { |
3313 |
|
|
for my $cn (@{$parent-><AG::Node.childNodes>}) { |
3314 |
|
|
if ($cn-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and |
3315 |
|
|
$cn-><AG::Node.localName> eq 'rights' and |
3316 |
|
|
$cn-><AG::Node.namespaceURI> eq <Q::atom|>) { |
3317 |
|
|
$r = $cn; |
3318 |
|
|
last E; |
3319 |
|
|
} |
3320 |
|
|
} |
3321 |
|
|
} |
3322 |
|
|
|
3323 |
|
|
my $od = $self-><AG::Node.ownerDocument>; |
3324 |
|
|
if ($od-><AG::Document.domConfig> |
3325 |
|
|
-><M::CFG.getParameter> (<Q::cfg|create-child-element>)) { |
3326 |
|
|
$r = $od-><M::Document.createElementNS> (<Q::atom|>, 'rights'); |
3327 |
|
|
$self-><M::Node.appendChild> ($r); |
3328 |
|
|
} |
3329 |
|
|
} # E |
3330 |
|
|
}__; |
3331 |
|
|
|
3332 |
|
|
@@Test: |
3333 |
|
|
@@@QName: AtomEntryElement.entryRightsElement.1.test |
3334 |
|
|
@@@PerlDef: |
3335 |
|
|
my $doc; |
3336 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3337 |
|
|
|
3338 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3339 |
|
|
|
3340 |
|
|
$test->id ('no'); |
3341 |
|
|
my $rights = $el-><AG::AtomEntryElement.entryRightsElement>; |
3342 |
|
|
$test->assert_null ($rights); |
3343 |
|
|
|
3344 |
|
|
$doc-><AG::Document.domConfig> |
3345 |
|
|
-><M::CFG.setParameter> (<Q::cfg|create-child-element> => true); |
3346 |
|
|
|
3347 |
|
|
$rights = $el-><AG::AtomEntryElement.entryRightsElement>; |
3348 |
|
|
|
3349 |
|
|
$test->id ('created.namespaceURI'); |
3350 |
|
|
$test->assert_equals ($rights-><AG::Node.namespaceURI>, <Q::atom|>); |
3351 |
|
|
|
3352 |
|
|
$test->id ('created.localName'); |
3353 |
|
|
$test->assert_equals ($rights-><AG::Node.localName>, 'rights'); |
3354 |
|
|
|
3355 |
|
|
$test->id ('created.parentNode'); |
3356 |
|
|
$test->assert_equals ($rights-><AG::Node.parentNode>, $el); |
3357 |
|
|
|
3358 |
|
|
$test->id ('get'); |
3359 |
|
|
my $rights2 = $el-><AG::AtomEntryElement.entryRightsElement>; |
3360 |
|
|
$test->assert_equals ($rights2, $rights); |
3361 |
|
|
@@Test: |
3362 |
|
|
@@@QName: AtomEntryElement.entryRightsElement.2.test |
3363 |
|
|
@@@PerlDef: |
3364 |
|
|
my $doc; |
3365 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3366 |
|
|
|
3367 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry'); |
3368 |
|
|
|
3369 |
|
|
my $feed = $doc-><M::Document.createElementNS> (<Q::atom|>, 'feed'); |
3370 |
|
|
$feed-><M::Node.appendChild> ($el); |
3371 |
|
|
my $rights = $doc-><M::Document.createElementNS> (<Q::atom|>, 'rights'); |
3372 |
|
|
$feed-><M::Node.appendChild> ($rights); |
3373 |
|
|
|
3374 |
|
|
$test->id ('get'); |
3375 |
|
|
my $rights2 = $el-><AG::AtomEntryElement.entryRightsElement>; |
3376 |
|
|
$test->assert_equals ($rights2, $rights); |
3377 |
|
|
|
3378 |
|
|
@Attr: |
3379 |
|
|
@@Name: sourceElement |
3380 |
|
|
@@enDesc: |
3381 |
|
|
The <XE::atom|source> child element of the node. |
3382 |
|
|
@@Type: AtomSourceElement |
3383 |
|
|
@@Get: |
3384 |
|
|
@@@enDesc: |
3385 |
|
|
It <kwd:MUST> <I::return a <XE::atom|source> child element> |
3386 |
|
|
of the node. |
3387 |
|
|
@@@nullCase: |
3388 |
|
|
@@@@enDesc: |
3389 |
|
|
If the algorithm returns <DOM::null>. |
3390 |
|
|
@@@NodeReadOnlyError: |
3391 |
|
|
@@@PerlDef: |
3392 |
|
|
__CODE{returnChildElement:: |
3393 |
|
|
$node => $self, |
3394 |
|
|
$namespaceURI => {<Q::atom|>}, |
3395 |
|
|
$localName => 'source', |
3396 |
|
|
$r => $r, |
3397 |
|
|
}__; |
3398 |
|
|
|
3399 |
|
|
@Attr: |
3400 |
|
|
@@Name: summaryElement |
3401 |
|
|
@@enDesc: |
3402 |
|
|
The <XE::atom|summary> child element of the node. |
3403 |
|
|
@@Type: AtomSummaryElement |
3404 |
|
|
@@Get: |
3405 |
|
|
@@@enDesc: |
3406 |
|
|
It <kwd:MUST> <I::return a <XE::atom|summary> child element> |
3407 |
|
|
of the node. |
3408 |
|
|
@@@nullCase: |
3409 |
|
|
@@@@enDesc: |
3410 |
|
|
If the algorithm returns <DOM::null>. |
3411 |
|
|
@@@NodeReadOnlyError: |
3412 |
|
|
@@@PerlDef: |
3413 |
|
|
__CODE{returnChildElement:: |
3414 |
|
|
$node => $self, |
3415 |
|
|
$namespaceURI => {<Q::atom|>}, |
3416 |
|
|
$localName => 'summary', |
3417 |
|
|
$r => $r, |
3418 |
|
|
}__; |
3419 |
|
|
|
3420 |
|
|
@Attr: |
3421 |
|
|
@@Name: titleElement |
3422 |
|
|
@@enDesc: |
3423 |
|
|
The <XE::atom|title> child element of the node. |
3424 |
|
|
@@Type: AtomTitleElement |
3425 |
|
|
@@Get: |
3426 |
|
|
@@@enDesc: |
3427 |
|
|
It <kwd:MUST> <I::return a <XE::atom|title> child element> |
3428 |
|
|
of the node. |
3429 |
|
|
@@@nullCase: |
3430 |
|
|
@@@@enDesc: |
3431 |
|
|
If the algorithm returns <DOM::null>. |
3432 |
|
|
@@@NodeReadOnlyError: |
3433 |
|
|
@@@disDef: |
3434 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.titleElement.get |
3435 |
|
|
|
3436 |
|
|
@Attr: |
3437 |
|
|
@@Name: updatedElement |
3438 |
|
|
@@enDesc: |
3439 |
|
|
The <XE::atom|updated> child element of the node. |
3440 |
|
|
@@Type: AtomUpdatedElement |
3441 |
|
|
@@Get: |
3442 |
|
|
@@@enDesc: |
3443 |
|
|
It <kwd:MUST> <I::return a <XE::atom|updated> child element> |
3444 |
|
|
of the node. |
3445 |
|
|
@@@nullCase: |
3446 |
|
|
@@@@enDesc: |
3447 |
|
|
If the algorithm returns <DOM::null>. |
3448 |
|
|
@@@NodeReadOnlyError: |
3449 |
|
|
@@@disDef: |
3450 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.updatedElement.get |
3451 |
|
|
##AtomEntryElement |
3452 |
|
|
|
3453 |
|
|
IFClsETDef: |
3454 |
wakaba |
1.7 |
@IFQName: AtomIdElement |
3455 |
|
|
@ETQName: atom|id |
3456 |
|
|
@ETRQName: atom|id |
3457 |
|
|
@ClsQName: ManakaiAtomIdElement |
3458 |
|
|
|
3459 |
|
|
@IFISA: AtomElement |
3460 |
|
|
@ClsISA: ManakaiAtomElement |
3461 |
wakaba |
1.10 |
|
3462 |
|
|
@mv:refers: atomCommonAttributes |
3463 |
wakaba |
1.9 |
|
3464 |
|
|
@cm: atomUriCM |
3465 |
wakaba |
1.7 |
##AtomIdElement |
3466 |
|
|
|
3467 |
|
|
IFClsETDef: |
3468 |
wakaba |
1.8 |
@IFQName: AtomIconElement |
3469 |
|
|
@ETQName: atom|icon |
3470 |
|
|
@ETRQName: atom|icon |
3471 |
|
|
@ClsQName: ManakaiAtomIconElement |
3472 |
|
|
|
3473 |
|
|
@IFISA: AtomElement |
3474 |
|
|
@ClsISA: ManakaiAtomElement |
3475 |
wakaba |
1.9 |
|
3476 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
3477 |
|
|
|
3478 |
wakaba |
1.9 |
@cm: atomUriCM |
3479 |
wakaba |
1.8 |
##AtomIconElement |
3480 |
|
|
|
3481 |
|
|
IFClsETDef: |
3482 |
wakaba |
1.7 |
@IFQName: AtomNameElement |
3483 |
|
|
@ETQName: atom|name |
3484 |
|
|
@ETRQName: atom|name |
3485 |
|
|
@ClsQName: ManakaiAtomNameElement |
3486 |
|
|
|
3487 |
|
|
@IFISA: AtomElement |
3488 |
|
|
@ClsISA: ManakaiAtomElement |
3489 |
wakaba |
1.9 |
|
3490 |
wakaba |
1.10 |
# no common attribs |
3491 |
wakaba |
1.9 |
@cm: TextCM |
3492 |
wakaba |
1.13 |
|
3493 |
|
|
@mv:refers: Atom |
3494 |
wakaba |
1.7 |
##AtomNameElement |
3495 |
|
|
|
3496 |
|
|
IFClsETDef: |
3497 |
|
|
@IFQName: AtomUriElement |
3498 |
|
|
@ETQName: atom|uri |
3499 |
|
|
@ETRQName: atom|uri |
3500 |
|
|
@ClsQName: ManakaiAtomUriElement |
3501 |
|
|
|
3502 |
|
|
@IFISA: AtomElement |
3503 |
|
|
@ClsISA: ManakaiAtomElement |
3504 |
wakaba |
1.9 |
|
3505 |
wakaba |
1.10 |
# no common attribs |
3506 |
wakaba |
1.9 |
@cm: atomUriCM |
3507 |
wakaba |
1.13 |
|
3508 |
|
|
@mv:refers: Atom |
3509 |
wakaba |
1.7 |
##AtomUriElement |
3510 |
|
|
|
3511 |
|
|
IFClsETDef: |
3512 |
|
|
@IFQName: AtomEmailElement |
3513 |
|
|
@ETQName: atom|email |
3514 |
|
|
@ETRQName: atom|email |
3515 |
|
|
@ClsQName: ManakaiAtomEmailElement |
3516 |
|
|
|
3517 |
|
|
@IFISA: AtomElement |
3518 |
|
|
@ClsISA: ManakaiAtomElement |
3519 |
wakaba |
1.9 |
|
3520 |
wakaba |
1.10 |
# no common attribs |
3521 |
wakaba |
1.9 |
@cm: atomEmailAddressCM |
3522 |
wakaba |
1.13 |
|
3523 |
|
|
@mv:refers: Atom |
3524 |
wakaba |
1.7 |
##AtomEmailElement |
3525 |
|
|
|
3526 |
|
|
IFClsETDef: |
3527 |
wakaba |
1.8 |
@IFQName: AtomLogoElement |
3528 |
|
|
@ETQName: atom|logo |
3529 |
|
|
@ETRQName: atom|logo |
3530 |
|
|
@ClsQName: ManakaiAtomLogoElement |
3531 |
|
|
|
3532 |
|
|
@IFISA: AtomElement |
3533 |
|
|
@ClsISA: ManakaiAtomElement |
3534 |
wakaba |
1.9 |
|
3535 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
3536 |
|
|
|
3537 |
wakaba |
1.9 |
@cm: atomUriCM |
3538 |
wakaba |
1.8 |
##AtomLogoElement |
3539 |
|
|
|
3540 |
|
|
IFClsETDef: |
3541 |
wakaba |
1.1 |
@IFQName: AtomContentElement |
3542 |
|
|
@ETQName: atom|content |
3543 |
wakaba |
1.6 |
@ETRQName: atom|content |
3544 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomContentElement |
3545 |
|
|
|
3546 |
|
|
@IFISA: AtomElement |
3547 |
|
|
@ClsISA: ManakaiAtomElement |
3548 |
|
|
|
3549 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
3550 |
|
|
|
3551 |
wakaba |
1.9 |
@cm: |
3552 |
|
|
dxm|ANY||ManakaiDOM|all |
3553 |
|
|
|
3554 |
wakaba |
1.1 |
@enDesc: |
3555 |
|
|
The <XE::atom|content> element either contains or links to |
3556 |
|
|
the content of the entry. |
3557 |
|
|
|
3558 |
wakaba |
1.13 |
@ATTR: |
3559 |
wakaba |
1.1 |
@@Name: type |
3560 |
|
|
@@enDesc: |
3561 |
|
|
The type of the element. |
3562 |
|
|
|
3563 |
|
|
It <kwd:MUST> <I::reflect the string value |
3564 |
|
|
of the <XA::type> attribute> of the node. It default |
3565 |
|
|
value <kwd:MUST> be <CODE::text> if and only if |
3566 |
|
|
there is no <XA::src> attribute on the node. |
3567 |
|
|
@@Type: DOMString |
3568 |
|
|
@@Get: |
3569 |
|
|
@@@nullCase: |
3570 |
|
|
@@@@enDesc: |
3571 |
|
|
If the algorithm returns <DOM::null>. |
3572 |
|
|
@@@PerlDef: |
3573 |
|
|
__CODE{getReflectAttrStringValue:: |
3574 |
|
|
$node => $self, |
3575 |
|
|
$namespaceURI => {null}, |
3576 |
|
|
$localName => 'type', |
3577 |
|
|
$r => $r, |
3578 |
|
|
$defaultValue => { |
3579 |
|
|
$self-><M::Element.hasAttributeNS> (null, 'src') ? null : 'text' |
3580 |
|
|
}, |
3581 |
|
|
}__; |
3582 |
|
|
@@Set: |
3583 |
|
|
@@@nullCase: |
3584 |
|
|
@@@@enDesc: |
3585 |
|
|
Removes the attribute. |
3586 |
|
|
@@@NodeReadOnlyError: |
3587 |
|
|
@@@PerlDef: |
3588 |
|
|
__CODE{setReflectAttrStringValue:: |
3589 |
|
|
$node => $self, |
3590 |
|
|
$namespaceURI => {null}, |
3591 |
|
|
$localName => 'type', |
3592 |
|
|
$given => $given, |
3593 |
|
|
}__; |
3594 |
|
|
|
3595 |
|
|
@@Test: |
3596 |
|
|
@@@QName: AtomContentElement.type.test |
3597 |
|
|
@@@PerlDef: |
3598 |
|
|
my $doc; |
3599 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3600 |
|
|
|
3601 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'content'); |
3602 |
|
|
|
3603 |
|
|
$test->id ('default.no.src'); |
3604 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.type>, 'text'); |
3605 |
|
|
|
3606 |
|
|
$test->id ('default.src'); |
3607 |
|
|
$el-><AS::AtomContentElement.src> ('http://atom.example/'); |
3608 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.type>); |
3609 |
|
|
|
3610 |
|
|
$test->id ('set.xhtml'); |
3611 |
|
|
$el-><AS::AtomContentElement.type> ('xhtml'); |
3612 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.type>, 'xhtml'); |
3613 |
|
|
|
3614 |
|
|
$test->id ('set.imt'); |
3615 |
|
|
$el-><AS::AtomContentElement.type> ('application/xml'); |
3616 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.type>, |
3617 |
|
|
'application/xml'); |
3618 |
|
|
|
3619 |
|
|
$test->id ('remove'); |
3620 |
|
|
$el-><AS::AtomContentElement.type> (null); |
3621 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.type>); |
3622 |
|
|
|
3623 |
wakaba |
1.13 |
@ATTR: |
3624 |
wakaba |
1.1 |
@@Name: src |
3625 |
|
|
@@enDesc: |
3626 |
|
|
The source of the remote content of the element. |
3627 |
|
|
|
3628 |
|
|
It <kwd:MUST> <I::reflect the string value |
3629 |
|
|
of the <XA::src> attribute> of the node. |
3630 |
|
|
@@Type: DOMString |
3631 |
|
|
@@Type: DOMURI |
3632 |
|
|
@@Get: |
3633 |
|
|
@@@nullCase: |
3634 |
|
|
@@@@enDesc: |
3635 |
|
|
If the algorithm returns <DOM::null>. |
3636 |
|
|
@@@PerlDef: |
3637 |
|
|
__CODE{getReflectAttrURIValue:: |
3638 |
|
|
$node => $self, |
3639 |
|
|
$namespaceURI => {null}, |
3640 |
|
|
$localName => 'src', |
3641 |
|
|
$r => $r, |
3642 |
|
|
$defaultValue => {null}, |
3643 |
|
|
}__; |
3644 |
|
|
@@Set: |
3645 |
|
|
@@@nullCase: |
3646 |
|
|
@@@@enDesc: |
3647 |
|
|
Removes the attribute. |
3648 |
|
|
@@@NodeReadOnlyError: |
3649 |
|
|
@@@PerlDef: |
3650 |
|
|
__CODE{setReflectAttrURIValue:: |
3651 |
|
|
$node => $self, |
3652 |
|
|
$namespaceURI => {null}, |
3653 |
|
|
$localName => 'src', |
3654 |
|
|
$given => $given, |
3655 |
|
|
}__; |
3656 |
|
|
|
3657 |
|
|
@@Test: |
3658 |
|
|
@@@QName: AtomContentElement.src.test |
3659 |
|
|
@@@PerlDef: |
3660 |
|
|
my $doc; |
3661 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3662 |
|
|
|
3663 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'content'); |
3664 |
|
|
|
3665 |
|
|
$test->id ('default'); |
3666 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.src>); |
3667 |
|
|
|
3668 |
|
|
$test->id ('set'); |
3669 |
|
|
$el-><AS::AtomContentElement.src> ('http://atom.example/'); |
3670 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.src>, |
3671 |
|
|
'http://atom.example/'); |
3672 |
|
|
|
3673 |
|
|
$test->id ('set.relative'); |
3674 |
|
|
$el-><AS::AtomContentElement.src> ('atom'); |
3675 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.src>, 'atom'); |
3676 |
|
|
|
3677 |
|
|
$test->id ('set.relative.base'); |
3678 |
|
|
$el-><M::Element.setAttributeNS> (<Q::xml|>, 'xml:base', |
3679 |
|
|
'http://atom.example/'); |
3680 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.src>, |
3681 |
|
|
'http://atom.example/atom'); |
3682 |
|
|
|
3683 |
|
|
$test->id ('remove'); |
3684 |
|
|
$el-><AS::AtomContentElement.src> (null); |
3685 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.src>); |
3686 |
|
|
|
3687 |
|
|
@Attr: |
3688 |
|
|
@@Name: container |
3689 |
|
|
@@enDesc: |
3690 |
|
|
The container element that contains the actual content for the node. |
3691 |
|
|
@@Type: Element |
3692 |
|
|
@@Get: |
3693 |
|
|
@@@enDesc: |
3694 |
|
|
- If the <A::AtomContentElement.type> is <CODE::xhtml>, |
3695 |
|
|
it <kwd:MUST> <I::return the <XE::html|div> child element>. |
3696 |
|
|
|
3697 |
|
|
- Otherwise, if the <A::AtomContentElement.src> is <DOM::null>, |
3698 |
|
|
it <kwd:MUST> return <DOM::null>. |
3699 |
|
|
|
3700 |
|
|
- Otherwise, it <kwd:MUST> return the node itself. |
3701 |
|
|
@@@nullCase: |
3702 |
|
|
@@@@enDesc: |
3703 |
|
|
If the algorithm returns <DOM::null>. |
3704 |
|
|
@@@NodeReadOnlyError: |
3705 |
|
|
@@@PerlDef: |
3706 |
|
|
__DEEP{ |
3707 |
|
|
my $type = $self-><AG::AtomContentElement.type>; |
3708 |
|
|
if (defined $type and $type eq 'xhtml') { |
3709 |
|
|
__UNDEEP{ |
3710 |
|
|
__CODE{returnChildElement:: |
3711 |
|
|
$node => $self, |
3712 |
|
|
$namespaceURI => {<Q::html|>}, |
3713 |
|
|
$localName => 'div', |
3714 |
|
|
$r => $r, |
3715 |
|
|
}__; |
3716 |
|
|
}__; |
3717 |
|
|
} elsif (not $self-><M::Element.hasAttributeNS> (null, 'src')) { |
3718 |
|
|
$r = $self; |
3719 |
|
|
} |
3720 |
|
|
}__; |
3721 |
|
|
|
3722 |
|
|
@@Test: |
3723 |
|
|
@@@QName: AtomContentElement.container.1.test |
3724 |
|
|
@@@PerlDef: |
3725 |
|
|
my $doc; |
3726 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3727 |
|
|
|
3728 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'content'); |
3729 |
|
|
|
3730 |
|
|
$test->id ('no'); |
3731 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.container>, $el); |
3732 |
|
|
|
3733 |
|
|
$test->id ('application/smil'); |
3734 |
|
|
$el-><AS::AtomContentElement.type> ('application/smil'); |
3735 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.container>, $el); |
3736 |
|
|
|
3737 |
|
|
$test->id ('text'); |
3738 |
|
|
$el-><AS::AtomContentElement.type> ('text'); |
3739 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.container>, $el); |
3740 |
|
|
|
3741 |
|
|
$test->id ('html'); |
3742 |
|
|
$el-><AS::AtomContentElement.type> ('html'); |
3743 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.container>, $el); |
3744 |
|
|
|
3745 |
|
|
$test->id ('xhtml'); |
3746 |
|
|
$el-><AS::AtomContentElement.type> ('xhtml'); |
3747 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.container>); |
3748 |
|
|
|
3749 |
|
|
$doc-><AG::Document.domConfig> |
3750 |
|
|
-><M::CFG.setParameter> (<Q::cfg|create-child-element> => true); |
3751 |
|
|
my $con = $el-><AG::AtomContentElement.container>; |
3752 |
|
|
|
3753 |
|
|
$test->id ('xhtml.create'); |
3754 |
|
|
$test->assert_not_equals ($con, $el); |
3755 |
|
|
|
3756 |
|
|
$test->id ('xhtml.namespaceURI'); |
3757 |
|
|
$test->assert_equals ($con-><AG::Node.namespaceURI>, <Q::html|>); |
3758 |
|
|
|
3759 |
|
|
$test->id ('xhtml.localName'); |
3760 |
|
|
$test->assert_equals ($con-><AG::Node.localName>, 'div'); |
3761 |
|
|
|
3762 |
|
|
$test->id ('xhtml.parentNode'); |
3763 |
|
|
$test->assert_equals ($con-><AG::Node.parentNode>, $el); |
3764 |
|
|
|
3765 |
|
|
$test->id ('xhtml.2'); |
3766 |
|
|
$test->assert_equals ($el-><AG::AtomContentElement.container>, $con); |
3767 |
|
|
@@Test: |
3768 |
|
|
@@@QName: AtomContentElement.container.2.test |
3769 |
|
|
@@@enDesc: |
3770 |
|
|
With <XA::src>. |
3771 |
|
|
@@@PerlDef: |
3772 |
|
|
my $doc; |
3773 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
3774 |
|
|
|
3775 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'content'); |
3776 |
|
|
|
3777 |
|
|
$el-><AS::AtomContentElement.src> ('http://www.example.com/'); |
3778 |
|
|
|
3779 |
|
|
$test->id ('no'); |
3780 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.container>); |
3781 |
|
|
|
3782 |
|
|
$test->id ('application/smil'); |
3783 |
|
|
$el-><AS::AtomContentElement.type> ('application/smil'); |
3784 |
|
|
$test->assert_null ($el-><AG::AtomContentElement.container>); |
3785 |
|
|
|
3786 |
|
|
@enImplNote: |
3787 |
|
|
@@ddid: base64 |
3788 |
|
|
@@@: |
3789 |
|
|
{TODO:: |
3790 |
|
|
Access to Base64'ed content is necessary. |
3791 |
|
|
} |
3792 |
|
|
##AtomContentElement |
3793 |
|
|
|
3794 |
|
|
IFClsETDef: |
3795 |
|
|
@IFQName: AtomAuthorElement |
3796 |
|
|
@ETQName: atom|author |
3797 |
wakaba |
1.6 |
@ETRQName: atom|author |
3798 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomAuthorElement |
3799 |
|
|
|
3800 |
|
|
@IFISA: AtomPersonConstruct |
3801 |
|
|
@ClsISA: ManakaiAtomPersonConstruct |
3802 |
wakaba |
1.8 |
@mv:refers: PersonAG |
3803 |
wakaba |
1.7 |
@mv:elementContentModel: PersonCM |
3804 |
wakaba |
1.1 |
|
3805 |
|
|
@enDesc: |
3806 |
|
|
The <XE::atom|author> element is a Person construct that |
3807 |
|
|
indicates the author of the entry or feed. |
3808 |
|
|
##AtomAuthorElement |
3809 |
|
|
|
3810 |
|
|
IFClsETDef: |
3811 |
|
|
@IFQName: AtomCategoryElement |
3812 |
|
|
@ETQName: atom|category |
3813 |
wakaba |
1.6 |
@ETRQName: atom|category |
3814 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomCategoryElement |
3815 |
|
|
|
3816 |
|
|
@IFISA: AtomElement |
3817 |
|
|
@ClsISA: ManakaiAtomElement |
3818 |
|
|
|
3819 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
3820 |
|
|
|
3821 |
wakaba |
1.9 |
@cm: undefinedContent |
3822 |
|
|
|
3823 |
wakaba |
1.1 |
@enDesc: |
3824 |
|
|
The <XE::atom|category> element conveys information abut |
3825 |
|
|
a category associated with an entry or feed. |
3826 |
|
|
|
3827 |
|
|
@Attr: |
3828 |
|
|
@@Name: term |
3829 |
|
|
@@enDesc: |
3830 |
|
|
The <XA::term> attribute of the element. |
3831 |
|
|
|
3832 |
|
|
It <kwd:MUST> <I::reflect the string value |
3833 |
|
|
of the <XA::term> attribute> of the node. |
3834 |
|
|
@@Type: DOMString |
3835 |
|
|
@@Get: |
3836 |
|
|
@@@nullCase: |
3837 |
|
|
@@@@enDesc: |
3838 |
|
|
If the algorithm returns <DOM::null>. |
3839 |
|
|
@@@PerlDef: |
3840 |
|
|
__CODE{getReflectAttrStringValue:: |
3841 |
|
|
$node => $self, |
3842 |
|
|
$namespaceURI => {null}, |
3843 |
|
|
$localName => 'term', |
3844 |
|
|
$r => $r, |
3845 |
|
|
$defaultValue => {null}, |
3846 |
|
|
}__; |
3847 |
|
|
@@Set: |
3848 |
|
|
@@@nullCase: |
3849 |
|
|
@@@@enDesc: |
3850 |
|
|
Removes the attribute. |
3851 |
|
|
@@@NodeReadOnlyError: |
3852 |
|
|
@@@PerlDef: |
3853 |
|
|
__CODE{setReflectAttrStringValue:: |
3854 |
|
|
$node => $self, |
3855 |
|
|
$namespaceURI => {null}, |
3856 |
|
|
$localName => 'term', |
3857 |
|
|
$given => $given, |
3858 |
|
|
}__; |
3859 |
|
|
|
3860 |
|
|
@Attr: |
3861 |
|
|
@@Name: scheme |
3862 |
|
|
@@enDesc: |
3863 |
|
|
The categorization scheme of the element. |
3864 |
|
|
|
3865 |
|
|
It <kwd:MUST> <I::reflect the URI value |
3866 |
|
|
of the <XA::scheme> attribute> of the node. |
3867 |
|
|
@@Type: DOMString |
3868 |
|
|
@@Type: DOMURI |
3869 |
|
|
@@Get: |
3870 |
|
|
@@@nullCase: |
3871 |
|
|
@@@@enDesc: |
3872 |
|
|
If the algorithm returns <DOM::null>. |
3873 |
|
|
@@@PerlDef: |
3874 |
|
|
__CODE{getReflectAttrURIValue:: |
3875 |
|
|
$node => $self, |
3876 |
|
|
$namespaceURI => {null}, |
3877 |
|
|
$localName => 'scheme', |
3878 |
|
|
$r => $r, |
3879 |
|
|
$defaultValue => {null}, |
3880 |
|
|
}__; |
3881 |
|
|
@@Set: |
3882 |
|
|
@@@nullCase: |
3883 |
|
|
@@@@enDesc: |
3884 |
|
|
Removes the attribute. |
3885 |
|
|
@@@NodeReadOnlyError: |
3886 |
|
|
@@@PerlDef: |
3887 |
|
|
__CODE{setReflectAttrURIValue:: |
3888 |
|
|
$node => $self, |
3889 |
|
|
$namespaceURI => {null}, |
3890 |
|
|
$localName => 'scheme', |
3891 |
|
|
$given => $given, |
3892 |
|
|
}__; |
3893 |
|
|
|
3894 |
|
|
@Attr: |
3895 |
|
|
@@Name: label |
3896 |
|
|
@@enDesc: |
3897 |
|
|
The <XA::label> attribute of the element. |
3898 |
|
|
|
3899 |
|
|
It <kwd:MUST> <I::reflect the string value |
3900 |
|
|
of the <XA::label> attribute> of the node. |
3901 |
|
|
@@Type: DOMString |
3902 |
|
|
@@Get: |
3903 |
|
|
@@@nullCase: |
3904 |
|
|
@@@@enDesc: |
3905 |
|
|
If the algorithm returns <DOM::null>. |
3906 |
|
|
@@@PerlDef: |
3907 |
|
|
__CODE{getReflectAttrStringValue:: |
3908 |
|
|
$node => $self, |
3909 |
|
|
$namespaceURI => {null}, |
3910 |
|
|
$localName => 'label', |
3911 |
|
|
$r => $r, |
3912 |
|
|
$defaultValue => {null}, |
3913 |
|
|
}__; |
3914 |
|
|
@@Set: |
3915 |
|
|
@@@nullCase: |
3916 |
|
|
@@@@enDesc: |
3917 |
|
|
Removes the attribute. |
3918 |
|
|
@@@NodeReadOnlyError: |
3919 |
|
|
@@@PerlDef: |
3920 |
|
|
__CODE{setReflectAttrStringValue:: |
3921 |
|
|
$node => $self, |
3922 |
|
|
$namespaceURI => {null}, |
3923 |
|
|
$localName => 'label', |
3924 |
|
|
$given => $given, |
3925 |
|
|
}__; |
3926 |
|
|
##AtomCategoryElement |
3927 |
|
|
|
3928 |
|
|
IFClsETDef: |
3929 |
|
|
@IFQName: AtomContributorElement |
3930 |
|
|
@ETQName: atom|contributor |
3931 |
wakaba |
1.6 |
@ETRQName: atom|contributor |
3932 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomContributorElement |
3933 |
|
|
|
3934 |
|
|
@IFISA: AtomPersonConstruct |
3935 |
|
|
@ClsISA: ManakaiAtomPersonConstruct |
3936 |
wakaba |
1.8 |
@mv:refers: PersonAG |
3937 |
wakaba |
1.7 |
@mv:elementContentModel: PersonCM |
3938 |
wakaba |
1.1 |
|
3939 |
|
|
@enDesc: |
3940 |
|
|
The <XE::atom|contributor> element is a Person construct that |
3941 |
|
|
indicates a person or other entity who contributed to the entry |
3942 |
|
|
or feed. |
3943 |
|
|
##AtomContributorElement |
3944 |
|
|
|
3945 |
|
|
IFClsETDef: |
3946 |
|
|
@IFQName: AtomGeneratorElement |
3947 |
|
|
@ETQName: atom|generator |
3948 |
wakaba |
1.6 |
@ETRQName: atom|generator |
3949 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomGeneratorElement |
3950 |
|
|
|
3951 |
|
|
@IFISA: AtomElement |
3952 |
|
|
@ClsISA: ManakaiAtomElement |
3953 |
|
|
|
3954 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
3955 |
|
|
|
3956 |
wakaba |
1.9 |
@cm: |
3957 |
|
|
(dxm|PCDATA||ManakaiDOM|all)* |
3958 |
|
|
|
3959 |
wakaba |
1.1 |
@enDesc: |
3960 |
|
|
The <XE::atom|generator> element identifies the agent used |
3961 |
|
|
to generate a feed. |
3962 |
|
|
|
3963 |
|
|
@Attr: |
3964 |
|
|
@@Name: uri |
3965 |
|
|
@@enDesc: |
3966 |
|
|
The URI attribute of the element. |
3967 |
|
|
|
3968 |
|
|
It <kwd:MUST> <I::reflect the URI value |
3969 |
|
|
of the <XA::uri> attribute> of the node. |
3970 |
|
|
@@Type: DOMString |
3971 |
|
|
@@Type: DOMURI |
3972 |
|
|
@@Get: |
3973 |
|
|
@@@nullCase: |
3974 |
|
|
@@@@enDesc: |
3975 |
|
|
If the algorithm returns <DOM::null>. |
3976 |
|
|
@@@PerlDef: |
3977 |
|
|
__CODE{getReflectAttrURIValue:: |
3978 |
|
|
$node => $self, |
3979 |
|
|
$namespaceURI => {null}, |
3980 |
|
|
$localName => 'uri', |
3981 |
|
|
$r => $r, |
3982 |
|
|
$defaultValue => {null}, |
3983 |
|
|
}__; |
3984 |
|
|
@@Set: |
3985 |
|
|
@@@nullCase: |
3986 |
|
|
@@@@enDesc: |
3987 |
|
|
Removes the attribute. |
3988 |
|
|
@@@NodeReadOnlyError: |
3989 |
|
|
@@@PerlDef: |
3990 |
|
|
__CODE{setReflectAttrURIValue:: |
3991 |
|
|
$node => $self, |
3992 |
|
|
$namespaceURI => {null}, |
3993 |
|
|
$localName => 'uri', |
3994 |
|
|
$given => $given, |
3995 |
|
|
}__; |
3996 |
|
|
|
3997 |
|
|
@Attr: |
3998 |
|
|
@@Name: version |
3999 |
|
|
@@enDesc: |
4000 |
|
|
The <XA::version> attribute of the element. |
4001 |
|
|
|
4002 |
|
|
It <kwd:MUST> <I::reflect the string value |
4003 |
|
|
of the <XA::version> attribute> of the node. |
4004 |
|
|
@@Type: DOMString |
4005 |
|
|
@@Get: |
4006 |
|
|
@@@nullCase: |
4007 |
|
|
@@@@enDesc: |
4008 |
|
|
If the algorithm returns <DOM::null>. |
4009 |
|
|
@@@PerlDef: |
4010 |
|
|
__CODE{getReflectAttrStringValue:: |
4011 |
|
|
$node => $self, |
4012 |
|
|
$namespaceURI => {null}, |
4013 |
|
|
$localName => 'version', |
4014 |
|
|
$r => $r, |
4015 |
|
|
$defaultValue => {null}, |
4016 |
|
|
}__; |
4017 |
|
|
@@Set: |
4018 |
|
|
@@@nullCase: |
4019 |
|
|
@@@@enDesc: |
4020 |
|
|
Removes the attribute. |
4021 |
|
|
@@@NodeReadOnlyError: |
4022 |
|
|
@@@PerlDef: |
4023 |
|
|
__CODE{setReflectAttrStringValue:: |
4024 |
|
|
$node => $self, |
4025 |
|
|
$namespaceURI => {null}, |
4026 |
|
|
$localName => 'version', |
4027 |
|
|
$given => $given, |
4028 |
|
|
}__; |
4029 |
|
|
##AtomGeneratorElement |
4030 |
|
|
|
4031 |
|
|
IFClsETDef: |
4032 |
|
|
@IFQName: AtomLinkElement |
4033 |
|
|
@ETQName: atom|link |
4034 |
wakaba |
1.6 |
@ETRQName: atom|link |
4035 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomLinkElement |
4036 |
|
|
|
4037 |
|
|
@IFISA: AtomElement |
4038 |
|
|
@ClsISA: ManakaiAtomElement |
4039 |
|
|
|
4040 |
wakaba |
1.10 |
@mv:refers: atomCommonAttributes |
4041 |
|
|
|
4042 |
wakaba |
1.9 |
@cm: undefinedContent |
4043 |
|
|
|
4044 |
wakaba |
1.1 |
@enDesc: |
4045 |
|
|
The <XE::atom|link> element defines a reference from an entry |
4046 |
|
|
or feed to a Web resource. |
4047 |
|
|
|
4048 |
wakaba |
1.6 |
@ATTR: |
4049 |
wakaba |
1.1 |
@@Name: href |
4050 |
|
|
@@enDesc: |
4051 |
|
|
The <XA::href> attribute of the element. |
4052 |
|
|
|
4053 |
|
|
It <kwd:MUST> <I::reflect the URI value |
4054 |
|
|
of the <XA::href> attribute> of the node. |
4055 |
|
|
@@Type: DOMString |
4056 |
wakaba |
1.6 |
@@actualType: DOMURI |
4057 |
wakaba |
1.1 |
@@Get: |
4058 |
|
|
@@@nullCase: |
4059 |
|
|
@@@@enDesc: |
4060 |
|
|
If the algorithm returns <DOM::null>. |
4061 |
|
|
@@@PerlDef: |
4062 |
|
|
__CODE{getReflectAttrURIValue:: |
4063 |
|
|
$node => $self, |
4064 |
|
|
$namespaceURI => {null}, |
4065 |
|
|
$localName => 'href', |
4066 |
|
|
$r => $r, |
4067 |
|
|
$defaultValue => {null}, |
4068 |
|
|
}__; |
4069 |
|
|
@@Set: |
4070 |
|
|
@@@nullCase: |
4071 |
|
|
@@@@enDesc: |
4072 |
|
|
Removes the attribute. |
4073 |
|
|
@@@NodeReadOnlyError: |
4074 |
|
|
@@@PerlDef: |
4075 |
|
|
__CODE{setReflectAttrURIValue:: |
4076 |
|
|
$node => $self, |
4077 |
|
|
$namespaceURI => {null}, |
4078 |
|
|
$localName => 'href', |
4079 |
|
|
$given => $given, |
4080 |
|
|
}__; |
4081 |
|
|
|
4082 |
wakaba |
1.6 |
@ATTR: |
4083 |
wakaba |
1.1 |
@@Name: rel |
4084 |
|
|
@@enDesc: |
4085 |
|
|
The <XA::rel> attribute of the element. |
4086 |
|
|
|
4087 |
|
|
It <kwd:MUST> <I::reflect the string value |
4088 |
|
|
of the <XA::rel> attribute> of the node, with |
4089 |
|
|
a few exceptions. The default value <kwd:MUST> |
4090 |
|
|
be <URI^DISCore|QName::rel|alternate>. |
4091 |
|
|
@@Type: DOMString |
4092 |
wakaba |
1.6 |
@@actualType: DOMURI |
4093 |
wakaba |
1.1 |
@@Get: |
4094 |
|
|
@@@enDesc: |
4095 |
|
|
If the algorithm returns a string that does not contain |
4096 |
|
|
any <CHAR::COLON> character, the string |
4097 |
|
|
<URI^DISCore|QName::rel|> <kwd:MUST> be prepended |
4098 |
|
|
for the return value of the getter. |
4099 |
|
|
@@@PerlDef: |
4100 |
|
|
__CODE{getReflectAttrStringValue:: |
4101 |
|
|
$node => $self, |
4102 |
|
|
$namespaceURI => {null}, |
4103 |
|
|
$localName => 'rel', |
4104 |
|
|
$r => $r, |
4105 |
|
|
$defaultValue => {<Q::rel|alternate>}, |
4106 |
|
|
}__; |
4107 |
|
|
if (defined $r and index ($r, ':') == -1) { |
4108 |
|
|
$r = <Q::rel|> . $r; |
4109 |
|
|
} |
4110 |
|
|
@@Set: |
4111 |
|
|
@@@enDesc: |
4112 |
|
|
If the given value starts with <URI^DISCore|QName::rel|> (by |
4113 |
|
|
simple character-by-character comparison), such substring |
4114 |
|
|
<kwd:MUST> be removed for the purpose of the setter algorithm, |
4115 |
|
|
if and only if the result string is not empty and does contain |
4116 |
|
|
none of <CHAR::COLON>, <CHAR::SOLIDUS>, <CHAR::QUESTION MARK>, |
4117 |
|
|
and <CHAR::NUMBER SIGN>. |
4118 |
|
|
@@@nullCase: |
4119 |
|
|
@@@@enDesc: |
4120 |
|
|
Removes the attribute. |
4121 |
|
|
@@@NodeReadOnlyError: |
4122 |
|
|
@@@PerlDef: |
4123 |
|
|
if (defined $given) { |
4124 |
|
|
$given =~ s[\Ahttp://www.iana.org/assignments/relation/([^:/?#]+)\z] |
4125 |
|
|
[$1]; |
4126 |
|
|
} |
4127 |
|
|
__CODE{setReflectAttrStringValue:: |
4128 |
|
|
$node => $self, |
4129 |
|
|
$namespaceURI => {null}, |
4130 |
|
|
$localName => 'rel', |
4131 |
|
|
$given => $given, |
4132 |
|
|
}__; |
4133 |
|
|
|
4134 |
|
|
@@Test: |
4135 |
|
|
@@@QName: AtomLinkElement.rel.test |
4136 |
|
|
@@@PerlDef: |
4137 |
|
|
my $doc; |
4138 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
4139 |
|
|
|
4140 |
|
|
my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link'); |
4141 |
|
|
|
4142 |
|
|
$test->id ('default'); |
4143 |
|
|
$test->assert_equals ($el-><AG::AtomLinkElement.rel>, |
4144 |
|
|
<Q::rel|alternate>); |
4145 |
|
|
|
4146 |
|
|
$test->id ('set'); |
4147 |
|
|
$el-><AS::AtomLinkElement.rel> ('http://www.example.com/'); |
4148 |
|
|
$test->assert_equals ($el-><AG::AtomLinkElement.rel>, |
4149 |
|
|
'http://www.example.com/'); |
4150 |
|
|
|
4151 |
|
|
$test->id ('set.self'); |
4152 |
|
|
$el-><AS::AtomLinkElement.rel> ('self'); |
4153 |
|
|
$test->assert_equals ($el-><AG::AtomLinkElement.rel>, |
4154 |
|
|
<Q::rel|self>); |
4155 |
|
|
|
4156 |
|
|
$test->id ('set.qrelated'); |
4157 |
|
|
$el-><AS::AtomLinkElement.rel> (<Q::rel|related>); |
4158 |
|
|
$test->assert_equals ($el-><AG::AtomLinkElement.rel>, |
4159 |
|
|
<Q::rel|related>); |
4160 |
|
|
|
4161 |
|
|
$test->id ('remove'); |
4162 |
|
|
$el-><AS::AtomLinkElement.rel> (null); |
4163 |
|
|
$test->assert_equals ($el-><AG::AtomLinkElement.rel>, |
4164 |
|
|
<Q::rel|alternate>); |
4165 |
|
|
|
4166 |
wakaba |
1.6 |
@ATTR: |
4167 |
wakaba |
1.1 |
@@Name: type |
4168 |
|
|
@@enDesc: |
4169 |
|
|
The <XA::type> attribute of the element. |
4170 |
|
|
|
4171 |
|
|
It <kwd:MUST> <I::reflect the string value |
4172 |
|
|
of the <XA::type> attribute> of the node. |
4173 |
|
|
@@Type: DOMString |
4174 |
|
|
@@Get: |
4175 |
|
|
@@@nullCase: |
4176 |
|
|
@@@@enDesc: |
4177 |
|
|
If the algorithm returns <DOM::null>. |
4178 |
|
|
@@@PerlDef: |
4179 |
|
|
__CODE{getReflectAttrStringValue:: |
4180 |
|
|
$node => $self, |
4181 |
|
|
$namespaceURI => {null}, |
4182 |
|
|
$localName => 'type', |
4183 |
|
|
$r => $r, |
4184 |
|
|
$defaultValue => {null}, |
4185 |
|
|
}__; |
4186 |
|
|
@@Set: |
4187 |
|
|
@@@nullCase: |
4188 |
|
|
@@@@enDesc: |
4189 |
|
|
Removes the attribute. |
4190 |
|
|
@@@NodeReadOnlyError: |
4191 |
|
|
@@@PerlDef: |
4192 |
|
|
__CODE{setReflectAttrStringValue:: |
4193 |
|
|
$node => $self, |
4194 |
|
|
$namespaceURI => {null}, |
4195 |
|
|
$localName => 'type', |
4196 |
|
|
$given => $given, |
4197 |
|
|
}__; |
4198 |
|
|
|
4199 |
wakaba |
1.6 |
@ATTR: |
4200 |
wakaba |
1.1 |
@@Name: hreflang |
4201 |
|
|
@@enDesc: |
4202 |
|
|
The <XA::hreflang> attribute of the element. |
4203 |
|
|
|
4204 |
|
|
It <kwd:MUST> <I::reflect the string value |
4205 |
|
|
of the <XA::hreflang> attribute> of the node. |
4206 |
|
|
@@Type: DOMString |
4207 |
|
|
@@Get: |
4208 |
|
|
@@@nullCase: |
4209 |
|
|
@@@@enDesc: |
4210 |
|
|
If the algorithm returns <DOM::null>. |
4211 |
|
|
@@@PerlDef: |
4212 |
|
|
__CODE{getReflectAttrStringValue:: |
4213 |
|
|
$node => $self, |
4214 |
|
|
$namespaceURI => {null}, |
4215 |
|
|
$localName => 'hreflang', |
4216 |
|
|
$r => $r, |
4217 |
|
|
$defaultValue => {null}, |
4218 |
|
|
}__; |
4219 |
|
|
@@Set: |
4220 |
|
|
@@@nullCase: |
4221 |
|
|
@@@@enDesc: |
4222 |
|
|
Removes the attribute. |
4223 |
|
|
@@@NodeReadOnlyError: |
4224 |
|
|
@@@PerlDef: |
4225 |
|
|
__CODE{setReflectAttrStringValue:: |
4226 |
|
|
$node => $self, |
4227 |
|
|
$namespaceURI => {null}, |
4228 |
|
|
$localName => 'hreflang', |
4229 |
|
|
$given => $given, |
4230 |
|
|
}__; |
4231 |
|
|
|
4232 |
wakaba |
1.6 |
@ATTR: |
4233 |
wakaba |
1.1 |
@@Name: title |
4234 |
|
|
@@enDesc: |
4235 |
|
|
The <XA::title> attribute of the element. |
4236 |
|
|
|
4237 |
|
|
It <kwd:MUST> <I::reflect the string value |
4238 |
|
|
of the <XA::title> attribute> of the node. |
4239 |
|
|
@@Type: DOMString |
4240 |
|
|
@@Get: |
4241 |
|
|
@@@nullCase: |
4242 |
|
|
@@@@enDesc: |
4243 |
|
|
If the algorithm returns <DOM::null>. |
4244 |
|
|
@@@PerlDef: |
4245 |
|
|
__CODE{getReflectAttrStringValue:: |
4246 |
|
|
$node => $self, |
4247 |
|
|
$namespaceURI => {null}, |
4248 |
|
|
$localName => 'title', |
4249 |
|
|
$r => $r, |
4250 |
|
|
$defaultValue => {null}, |
4251 |
|
|
}__; |
4252 |
|
|
@@Set: |
4253 |
|
|
@@@nullCase: |
4254 |
|
|
@@@@enDesc: |
4255 |
|
|
Removes the attribute. |
4256 |
|
|
@@@NodeReadOnlyError: |
4257 |
|
|
@@@PerlDef: |
4258 |
|
|
__CODE{setReflectAttrStringValue:: |
4259 |
|
|
$node => $self, |
4260 |
|
|
$namespaceURI => {null}, |
4261 |
|
|
$localName => 'title', |
4262 |
|
|
$given => $given, |
4263 |
|
|
}__; |
4264 |
|
|
|
4265 |
wakaba |
1.6 |
@ATTR: |
4266 |
wakaba |
1.1 |
@@Name: length |
4267 |
|
|
@@enDesc: |
4268 |
|
|
The <XA::length> attribute of the element. |
4269 |
|
|
|
4270 |
|
|
It <kwd:MUST> <I::reflect the string value |
4271 |
|
|
of the <XA::length> attribute> of the node. |
4272 |
|
|
@@Type: DOMString |
4273 |
|
|
@@Get: |
4274 |
|
|
@@@nullCase: |
4275 |
|
|
@@@@enDesc: |
4276 |
|
|
If the algorithm returns <DOM::null>. |
4277 |
|
|
@@@PerlDef: |
4278 |
|
|
__CODE{getReflectAttrStringValue:: |
4279 |
|
|
$node => $self, |
4280 |
|
|
$namespaceURI => {null}, |
4281 |
|
|
$localName => 'length', |
4282 |
|
|
$r => $r, |
4283 |
|
|
$defaultValue => {null}, |
4284 |
|
|
}__; |
4285 |
|
|
@@Set: |
4286 |
|
|
@@@nullCase: |
4287 |
|
|
@@@@enDesc: |
4288 |
|
|
Removes the attribute. |
4289 |
|
|
@@@NodeReadOnlyError: |
4290 |
|
|
@@@PerlDef: |
4291 |
|
|
__CODE{setReflectAttrStringValue:: |
4292 |
|
|
$node => $self, |
4293 |
|
|
$namespaceURI => {null}, |
4294 |
|
|
$localName => 'length', |
4295 |
|
|
$given => $given, |
4296 |
|
|
}__; |
4297 |
|
|
##AtomLinkElement |
4298 |
|
|
|
4299 |
|
|
IFClsETDef: |
4300 |
|
|
@IFQName: AtomPublishedElement |
4301 |
|
|
@ETQName: atom|published |
4302 |
wakaba |
1.6 |
@ETRQName: atom|published |
4303 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomPublishedElement |
4304 |
|
|
|
4305 |
|
|
@IFISA: AtomDateConstruct |
4306 |
|
|
@ClsISA: ManakaiAtomDateConstruct |
4307 |
wakaba |
1.8 |
@mv:refers: DateAG |
4308 |
wakaba |
1.7 |
@mv:elementContentModel: DateCM |
4309 |
wakaba |
1.1 |
|
4310 |
|
|
@enDesc: |
4311 |
|
|
The <XE::atom|published> element is a Date construct |
4312 |
|
|
indicating an instant in time associated with an |
4313 |
|
|
event early in the life cycle of the entry. |
4314 |
|
|
|
4315 |
|
|
Typically, <XE::atom|published> will be associated with |
4316 |
|
|
the initial creation or first availability of the resouce. |
4317 |
|
|
##AtomPublishedElement |
4318 |
|
|
|
4319 |
|
|
IFClsETDef: |
4320 |
|
|
@IFQName: AtomRightsElement |
4321 |
|
|
@ETQName: atom|rights |
4322 |
wakaba |
1.6 |
@ETRQName: atom|rights |
4323 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomRightsElement |
4324 |
|
|
|
4325 |
|
|
@IFISA: AtomTextConstruct |
4326 |
|
|
@ClsISA: ManakaiAtomTextConstruct |
4327 |
wakaba |
1.8 |
@mv:refers: TextAG |
4328 |
wakaba |
1.7 |
@mv:elementContentModel: TextCM |
4329 |
wakaba |
1.1 |
|
4330 |
|
|
@enDesc: |
4331 |
|
|
The <XE::atom|rights> element is a Text construct |
4332 |
|
|
that conveys information about rights held in and |
4333 |
|
|
over an entry or feed. |
4334 |
|
|
##AtomRightsElement |
4335 |
|
|
|
4336 |
wakaba |
1.8 |
ECDef: |
4337 |
|
|
@QName: source-prop |
4338 |
|
|
@mv:elementTypeClassName: source-prop |
4339 |
|
|
@mv:refers: atom|author |
4340 |
|
|
@mv:refers: atom|category |
4341 |
|
|
@mv:refers: atom|contributor |
4342 |
|
|
@mv:refers: atom|generator |
4343 |
|
|
@mv:refers: atom|icon |
4344 |
|
|
@mv:refers: atom|id |
4345 |
|
|
@mv:refers: atom|link |
4346 |
|
|
@mv:refers: atom|logo |
4347 |
|
|
@mv:refers: atom|rights |
4348 |
|
|
@mv:refers: atom|subtitle |
4349 |
|
|
@mv:refers: atom|title |
4350 |
|
|
@mv:refers: atom|updated |
4351 |
|
|
@mv:refers: extensionElements |
4352 |
|
|
|
4353 |
wakaba |
1.1 |
IFClsETDef: |
4354 |
|
|
@IFQName: AtomSourceElement |
4355 |
|
|
@ETQName: atom|source |
4356 |
wakaba |
1.6 |
@ETRQName: atom|source |
4357 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomSourceElement |
4358 |
|
|
|
4359 |
|
|
@IFISA: AtomElement |
4360 |
|
|
@ClsISA: ManakaiAtomElement |
4361 |
wakaba |
1.10 |
|
4362 |
|
|
@mv:refers: atomCommonAttributes |
4363 |
wakaba |
1.1 |
|
4364 |
wakaba |
1.9 |
@cm: |
4365 |
|
|
(source-prop*) |
4366 |
|
|
|
4367 |
wakaba |
1.1 |
@Attr: |
4368 |
|
|
@@Name: authorElements |
4369 |
|
|
@@enDesc: |
4370 |
|
|
A static list of <XE::atom|author> child elements of the node. |
4371 |
|
|
@@Type: StaticNodeList |
4372 |
|
|
@@Get: |
4373 |
|
|
@@@enDesc: |
4374 |
|
|
It <kwd:MUST> <I::return a <XE::atom|author> child element list> |
4375 |
|
|
of the node. |
4376 |
|
|
@@@disDef: |
4377 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.authorElements.get |
4378 |
|
|
|
4379 |
|
|
@Attr: |
4380 |
|
|
@@Name: categoryElements |
4381 |
|
|
@@enDesc: |
4382 |
|
|
A static list of <XE::atom|category> child elements of the node. |
4383 |
|
|
@@Type: StaticNodeList |
4384 |
|
|
@@Get: |
4385 |
|
|
@@@enDesc: |
4386 |
|
|
It <kwd:MUST> <I::return a <XE::atom|category> child element list> |
4387 |
|
|
of the node. |
4388 |
|
|
@@@disDef: |
4389 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.categoryElements.get |
4390 |
|
|
|
4391 |
|
|
@Attr: |
4392 |
|
|
@@Name: contributorElements |
4393 |
|
|
@@enDesc: |
4394 |
|
|
A static list of <XE::atom|contributor> child elements of the node. |
4395 |
|
|
@@Type: StaticNodeList |
4396 |
|
|
@@Get: |
4397 |
|
|
@@@enDesc: |
4398 |
|
|
It <kwd:MUST> <I::return a <XE::atom|contributor> child element list> |
4399 |
|
|
of the node. |
4400 |
|
|
@@@disDef: |
4401 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.contributorElements.get |
4402 |
|
|
|
4403 |
|
|
@Attr: |
4404 |
|
|
@@Name: generatorElement |
4405 |
|
|
@@enDesc: |
4406 |
|
|
The <XE::atom|generator> child element of the node. |
4407 |
|
|
@@Type: AtomGeneratorElement |
4408 |
|
|
@@Get: |
4409 |
|
|
@@@enDesc: |
4410 |
|
|
It <kwd:MUST> <I::return a <XE::atom|generator> child element> |
4411 |
|
|
of the node. |
4412 |
|
|
@@@nullCase: |
4413 |
|
|
@@@@enDesc: |
4414 |
|
|
If the algorithm returns <DOM::null>. |
4415 |
|
|
@@@NodeReadOnlyError: |
4416 |
|
|
@@@disDef: |
4417 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.generatorElement.get |
4418 |
|
|
|
4419 |
|
|
@Attr: |
4420 |
|
|
@@Name: icon |
4421 |
|
|
@@enDesc: |
4422 |
|
|
The <XE::atom|icon> value of the node. |
4423 |
|
|
|
4424 |
|
|
It <kwd:MUST> <I::reflect the URI value |
4425 |
|
|
of the <XE::atom|icon> child element> of the node. |
4426 |
|
|
@@Type: DOMString |
4427 |
|
|
@@actualType: DOMURI |
4428 |
|
|
@@Get: |
4429 |
|
|
@@@nullCase: |
4430 |
|
|
@@@@enDesc: |
4431 |
|
|
If the algorithm returns <DOM::null>. |
4432 |
|
|
@@@NodeReadOnlyError: |
4433 |
|
|
@@@disDef: |
4434 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.icon.get |
4435 |
|
|
@@Set: |
4436 |
|
|
@@@nullCase: |
4437 |
|
|
@@@@enDesc: |
4438 |
|
|
Removes the value. |
4439 |
|
|
@@@NodeReadOnlyError: |
4440 |
|
|
@@@disDef: |
4441 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.icon.set |
4442 |
|
|
|
4443 |
|
|
@Attr: |
4444 |
|
|
@@Name: id |
4445 |
|
|
@@enDesc: |
4446 |
|
|
The <XE::atom|id> value of the node. |
4447 |
|
|
|
4448 |
|
|
It <kwd:MUST> <I::reflect the string value |
4449 |
|
|
of the <XE::atom|id> child element> of the node. |
4450 |
|
|
@@Type: DOMString |
4451 |
|
|
@@actualType: DOMURI |
4452 |
|
|
@@Get: |
4453 |
|
|
@@@nullCase: |
4454 |
|
|
@@@@enDesc: |
4455 |
|
|
If the algorithm returns <DOM::null>. |
4456 |
|
|
@@@NodeReadOnlyError: |
4457 |
|
|
@@@disDef: |
4458 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.id.get |
4459 |
|
|
@@Set: |
4460 |
|
|
@@@nullCase: |
4461 |
|
|
@@@@enDesc: |
4462 |
|
|
Removes the value. |
4463 |
|
|
@@@NodeReadOnlyError: |
4464 |
|
|
@@@disDef: |
4465 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.id.set |
4466 |
|
|
|
4467 |
|
|
@Attr: |
4468 |
|
|
@@Name: linkElements |
4469 |
|
|
@@enDesc: |
4470 |
|
|
A static list of <XE::atom|link> child elements of the node. |
4471 |
|
|
@@Type: StaticNodeList |
4472 |
|
|
@@Get: |
4473 |
|
|
@@@enDesc: |
4474 |
|
|
It <kwd:MUST> <I::return a <XE::atom|link> child element list> |
4475 |
|
|
of the node. |
4476 |
|
|
@@@disDef: |
4477 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.linkElements.get |
4478 |
|
|
|
4479 |
|
|
@Attr: |
4480 |
|
|
@@Name: logo |
4481 |
|
|
@@enDesc: |
4482 |
|
|
The <XE::atom|logo> value of the node. |
4483 |
|
|
|
4484 |
|
|
It <kwd:MUST> <I::reflect the URI value |
4485 |
|
|
of the <XE::atom|logo> child element> of the node. |
4486 |
|
|
@@Type: DOMString |
4487 |
|
|
@@actualType: DOMURI |
4488 |
|
|
@@Get: |
4489 |
|
|
@@@nullCase: |
4490 |
|
|
@@@@enDesc: |
4491 |
|
|
If the algorithm returns <DOM::null>. |
4492 |
|
|
@@@NodeReadOnlyError: |
4493 |
|
|
@@@disDef: |
4494 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.logo.get |
4495 |
|
|
@@Set: |
4496 |
|
|
@@@nullCase: |
4497 |
|
|
@@@@enDesc: |
4498 |
|
|
Removes the value. |
4499 |
|
|
@@@NodeReadOnlyError: |
4500 |
|
|
@@@disDef: |
4501 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.logo.set |
4502 |
|
|
|
4503 |
|
|
@Attr: |
4504 |
|
|
@@Name: rightsElement |
4505 |
|
|
@@enDesc: |
4506 |
|
|
The <XE::atom|rights> child element of the node. |
4507 |
|
|
@@Type: AtomRightsElement |
4508 |
|
|
@@Get: |
4509 |
|
|
@@@enDesc: |
4510 |
|
|
It <kwd:MUST> <I::return a <XE::atom|rights> child element> |
4511 |
|
|
of the node. |
4512 |
|
|
@@@nullCase: |
4513 |
|
|
@@@@enDesc: |
4514 |
|
|
If the algorithm returns <DOM::null>. |
4515 |
|
|
@@@NodeReadOnlyError: |
4516 |
|
|
@@@disDef: |
4517 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.rightsElement.get |
4518 |
|
|
|
4519 |
|
|
@Attr: |
4520 |
|
|
@@Name: subtitleElement |
4521 |
|
|
@@enDesc: |
4522 |
|
|
The <XE::atom|subtitle> child element of the node. |
4523 |
|
|
@@Type: AtomSubtitleElement |
4524 |
|
|
@@Get: |
4525 |
|
|
@@@enDesc: |
4526 |
|
|
It <kwd:MUST> <I::return a <XE::atom|subtitle> child element> |
4527 |
|
|
of the node. |
4528 |
|
|
@@@nullCase: |
4529 |
|
|
@@@@enDesc: |
4530 |
|
|
If the algorithm returns <DOM::null>. |
4531 |
|
|
@@@NodeReadOnlyError: |
4532 |
|
|
@@@disDef: |
4533 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.subtitleElement.get |
4534 |
|
|
|
4535 |
|
|
@Attr: |
4536 |
|
|
@@Name: titleElement |
4537 |
|
|
@@enDesc: |
4538 |
|
|
The <XE::atom|title> child element of the node. |
4539 |
|
|
@@Type: AtomTitleElement |
4540 |
|
|
@@Get: |
4541 |
|
|
@@@enDesc: |
4542 |
|
|
It <kwd:MUST> <I::return a <XE::atom|title> child element> |
4543 |
|
|
of the node. |
4544 |
|
|
@@@nullCase: |
4545 |
|
|
@@@@enDesc: |
4546 |
|
|
If the algorithm returns <DOM::null>. |
4547 |
|
|
@@@NodeReadOnlyError: |
4548 |
|
|
@@@disDef: |
4549 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.titleElement.get |
4550 |
|
|
|
4551 |
|
|
@Attr: |
4552 |
|
|
@@Name: updatedElement |
4553 |
|
|
@@enDesc: |
4554 |
|
|
The <XE::atom|updated> child element of the node. |
4555 |
|
|
@@Type: AtomUpdatedElement |
4556 |
|
|
@@Get: |
4557 |
|
|
@@@enDesc: |
4558 |
|
|
It <kwd:MUST> <I::return a <XE::atom|updated> child element> |
4559 |
|
|
of the node. |
4560 |
|
|
@@@nullCase: |
4561 |
|
|
@@@@enDesc: |
4562 |
|
|
If the algorithm returns <DOM::null>. |
4563 |
|
|
@@@NodeReadOnlyError: |
4564 |
|
|
@@@disDef: |
4565 |
|
|
@@@@dlp:cloneCode: ManakaiAtomFeedElement.updatedElement.get |
4566 |
|
|
##AtomSourceElement |
4567 |
|
|
|
4568 |
|
|
IFClsETDef: |
4569 |
|
|
@IFQName: AtomSubtitleElement |
4570 |
|
|
@ETQName: atom|subtitle |
4571 |
wakaba |
1.6 |
@ETRQName: atom|subtitle |
4572 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomSubtitleElement |
4573 |
|
|
|
4574 |
|
|
@IFISA: AtomTextConstruct |
4575 |
|
|
@ClsISA: ManakaiAtomTextConstruct |
4576 |
wakaba |
1.8 |
@mv:refers: TextAG |
4577 |
wakaba |
1.7 |
@mv:elementContentModel: TextCM |
4578 |
wakaba |
1.1 |
|
4579 |
|
|
@enDesc: |
4580 |
|
|
The <XE::atom|subtitle> element is a Text construct |
4581 |
|
|
that conveys a human-readable description or subtitle for a feed. |
4582 |
|
|
##AtomSubtitleElement |
4583 |
|
|
|
4584 |
|
|
IFClsETDef: |
4585 |
|
|
@IFQName: AtomSummaryElement |
4586 |
|
|
@ETQName: atom|summary |
4587 |
wakaba |
1.6 |
@ETRQName: atom|summary |
4588 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomSummaryElement |
4589 |
|
|
|
4590 |
|
|
@IFISA: AtomTextConstruct |
4591 |
|
|
@ClsISA: ManakaiAtomTextConstruct |
4592 |
wakaba |
1.8 |
@mv:refers: TextAG |
4593 |
wakaba |
1.7 |
@mv:elementContentModel: TextCM |
4594 |
wakaba |
1.1 |
|
4595 |
|
|
@enDesc: |
4596 |
|
|
The <XE::atom|summary> element is a Text construct |
4597 |
|
|
that conveys a short summary, abstract, or excerpt of an entry. |
4598 |
|
|
##AtomSummaryElement |
4599 |
|
|
|
4600 |
|
|
IFClsETDef: |
4601 |
|
|
@IFQName: AtomTitleElement |
4602 |
|
|
@ETQName: atom|title |
4603 |
wakaba |
1.6 |
@ETRQName: atom|title |
4604 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomTitleElement |
4605 |
|
|
|
4606 |
|
|
@IFISA: AtomTextConstruct |
4607 |
|
|
@ClsISA: ManakaiAtomTextConstruct |
4608 |
wakaba |
1.8 |
@mv:refers: TextAG |
4609 |
wakaba |
1.7 |
@mv:elementContentModel: TextCM |
4610 |
wakaba |
1.1 |
|
4611 |
|
|
@enDesc: |
4612 |
|
|
The <XE::atom|title> element is a Text construct |
4613 |
|
|
that conveys a human-readable title for an entry or feed. |
4614 |
|
|
##AtomTitleElement |
4615 |
|
|
|
4616 |
|
|
IFClsETDef: |
4617 |
|
|
@IFQName: AtomUpdatedElement |
4618 |
|
|
@ETQName: atom|updated |
4619 |
wakaba |
1.6 |
@ETRQName: atom|updated |
4620 |
wakaba |
1.1 |
@ClsQName: ManakaiAtomUpdatedElement |
4621 |
|
|
|
4622 |
|
|
@IFISA: AtomDateConstruct |
4623 |
|
|
@ClsISA: ManakaiAtomDateConstruct |
4624 |
wakaba |
1.8 |
@mv:refers: DateAG |
4625 |
wakaba |
1.7 |
@mv:elementContentModel: DateCM |
4626 |
wakaba |
1.1 |
|
4627 |
|
|
@enDesc: |
4628 |
|
|
The <XE::atom|updated> element is a Date construct |
4629 |
|
|
indicating the most recent instant in time when an |
4630 |
|
|
entry or feed was modified in a way the publisher considers |
4631 |
|
|
significant. |
4632 |
|
|
##AtomPublishedElement |
4633 |
|
|
|
4634 |
|
|
ElementTypeBinding: |
4635 |
|
|
@Name: NodeReadOnlyError |
4636 |
|
|
@ElementType: |
4637 |
|
|
dx:raises |
4638 |
|
|
@ShadowContent: |
4639 |
|
|
@@@: MDOMX|NOMOD_THIS |
4640 |
|
|
@@Description: |
4641 |
|
|
@@@lang:en |
4642 |
|
|
@@@@: |
4643 |
|
|
If the node or a descendant of it, which |
4644 |
|
|
is to be modified, is read-only. |
4645 |
|
|
|
4646 |
|
|
## -- Configuration Parameters |
4647 |
|
|
|
4648 |
|
|
boolCParam: |
4649 |
|
|
@QName: cfg|create-child-element |
4650 |
|
|
@tc:nodeStemKey: |
4651 |
|
|
@@@: ccldel |
4652 |
|
|
@@ForCheck: =ManakaiDOM|all |
4653 |
|
|
@c:targetType: tc|Document |
4654 |
|
|
@IsSupportRequired:1 |
4655 |
|
|
@TrueCase: |
4656 |
|
|
@@c:isSupported:1 |
4657 |
|
|
@@enDesc: |
4658 |
|
|
If the parameter is set to <DOM::true>, some DOM attributes |
4659 |
|
|
that returns an element will create a child element |
4660 |
|
|
when there is no element that met the condition defined |
4661 |
|
|
for that DOM attribute. |
4662 |
|
|
@FalseCase: |
4663 |
|
|
@@c:isSupported:1 |
4664 |
|
|
@@IsSupportRequired:1 |
4665 |
|
|
@@IsDefault:1 |
4666 |
|
|
@@enDesc: |
4667 |
|
|
If the parameter is set to <DOM::true>, some DOM attributes |
4668 |
|
|
that returns an element will <EM::not> create a child element |
4669 |
|
|
even when there is no element that met the condition defined |
4670 |
|
|
for that DOM attribute. |
4671 |
|
|
@TestC: |
4672 |
|
|
@@QName: cfg.create-child-element.set.test |
4673 |
|
|
@@PerlCDef: |
4674 |
|
|
my $doc; |
4675 |
|
|
__CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; |
4676 |
|
|
|
4677 |
|
|
my $cfg = $doc-><AG::Document.domConfig>; |
4678 |
|
|
my $cp = <Q::cfg|create-child-element>; |
4679 |
|
|
|
4680 |
|
|
$test->id ('default'); |
4681 |
|
|
$test->assert_false ($cfg-><M::CFG.getParameter> ($cp)); |
4682 |
|
|
|
4683 |
|
|
$test->id ('set.f.to.t'); |
4684 |
|
|
$cfg-><M::CFG.setParameter> ($cp => true); |
4685 |
|
|
$test->assert_true ($cfg-><M::CFG.getParameter> ($cp)); |
4686 |
|
|
|
4687 |
|
|
$test->id ('set.t.to.f'); |
4688 |
|
|
$cfg-><M::CFG.setParameter> ($cp => false); |
4689 |
|
|
$test->assert_false ($cfg-><M::CFG.getParameter> ($cp)); |
4690 |
|
|
|
4691 |
|
|
$cfg-><M::CFG.setParameter> ($cp => true); |
4692 |
|
|
|
4693 |
|
|
$test->id ('reset'); |
4694 |
|
|
$cfg-><M::CFG.setParameter> ($cp => null); |
4695 |
|
|
$test->assert_false ($cfg-><M::CFG.getParameter> ($cp)); |
4696 |
|
|
|
4697 |
|
|
ResourceDef: |
4698 |
|
|
@QName: CFG |
4699 |
|
|
@AliasFor: c|DOMConfiguration |
4700 |
|
|
@For: ManakaiDOM|DOM3 |
4701 |
|
|
|
4702 |
|
|
ElementTypeBinding: |
4703 |
|
|
@Name: boolCParam |
4704 |
|
|
@ElementType: |
4705 |
|
|
dis:ResourceDef |
4706 |
|
|
@ShadowContent: |
4707 |
|
|
@@DISCore:resourceType: |
4708 |
|
|
@@@@: c|DOMConfigurationParameter |
4709 |
|
|
@@@For: ManakaiDOM|DOM |
4710 |
|
|
@@DISCore:resourceType: |
4711 |
|
|
@@@@: DISCore|Property |
4712 |
|
|
@@@For: =ManakaiDOM|all |
4713 |
|
|
@@For: ManakaiDOM|DOM3 |
4714 |
|
|
@@For: =ManakaiDOM|all |
4715 |
|
|
@@Type: idl|boolean||ManakaiDOM|all |
4716 |
wakaba |
1.8 |
|
4717 |
|
|
ECDef: |
4718 |
|
|
@QName: simpleExtensionElements |
4719 |
|
|
@mv:elementTypeClassName: simple.extra |
4720 |
|
|
@DISCore:resourceType: mv|ElementTypeAdditionalClass |
4721 |
|
|
|
4722 |
|
|
ECDef: |
4723 |
|
|
@QName: structuredExtensionElements |
4724 |
|
|
@mv:elementTypeClassName: structured.extra |
4725 |
|
|
@DISCore:resourceType: mv|ElementTypeAdditionalClass |
4726 |
|
|
|
4727 |
|
|
EMDef: |
4728 |
|
|
@QName: extensionElements |
4729 |
|
|
@mv:elementTypeClassName: extra |
4730 |
|
|
@mv:refers: simpleExtensionElements |
4731 |
|
|
@mv:refers: structuredExtensionElements |
4732 |
|
|
@DISCore:resourceType: mv|ElementTypeAdditionalClass |
4733 |
|
|
|
4734 |
|
|
AGDef: |
4735 |
|
|
@QName: undefinedAttributes |
4736 |
|
|
@mv:attributeTypeGroupName: common.extra |
4737 |
|
|
|
4738 |
wakaba |
1.9 |
ResourceDef: |
4739 |
|
|
@QName: undefinedContent |
4740 |
|
|
@mv:elementContentModelName: undefined |
4741 |
|
|
@For: =ManakaiDOM|ManakaiDOMLatest |
4742 |
|
|
@DISCore:resourceType: mv|ElementContentModel |
4743 |
|
|
@cm: dxm|ANY||ManakaiDOM|all |
4744 |
|
|
@enImplNote: |
4745 |
|
|
(text | anyForeignElement)* |