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