/[suikacvs]/messaging/manakai/lib/Message/Markup/Atom.dis
Suika

Contents of /messaging/manakai/lib/Message/Markup/Atom.dis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Apr 29 11:05:09 2006 UTC (18 years ago) by wakaba
Branch: MAIN
++ manakai/t/ChangeLog	29 Apr 2006 11:04:52 -0000
2006-04-29  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (markup-Atom.t): New test.
	(test-module-markup): New rule.
	(test-module-all): The |test-module-markup| is added to the list
	of rules.

++ manakai/lib/Message/Markup/ChangeLog	29 Apr 2006 11:04:06 -0000
2006-04-29  Wakaba  <wakaba@suika.fam.cx>

	* common.dis: New module.

	* Atom.dis: New module.

	* Makefile: New modules are added.

	* SuikaWikiConfig21.dis (Require): A reference
	to the |Markup:common| module is added.
	(Markup|): Removed (moved to the |Markup:common| module).

++ manakai/lib/Message/DOM/ChangeLog	29 Apr 2006 11:02:19 -0000
2006-04-29  Wakaba  <wakaba@suika.fam.cx>

	* Element.dis (removeAttributeNS): A runtime error
	was occurred if there was no specified attribute node.

	* TreeCore.dis (manakaiLanguage): New attribute.

2006-04-28  Wakaba  <wakaba@suika.fam.cx>

	* TreeCore.dis (NodeList.manakaiReadOnly, NamedNodeMap.manakaiReadOnly):
	New attributes.

	(StaticNodeList): New interface.

2006-04-24  Wakaba  <wakaba@suika.fam.cx>

	* DOMCore.dis (c:SET_TO_NULL_ERR): New error code.

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24