/[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.8 - (hide annotations) (download)
Sun May 28 06:34:59 2006 UTC (17 years, 11 months ago) by wakaba
Branch: MAIN
CVS Tags: manakai-release-0-3-2
Changes since 1.7: +148 -13 lines
++ manakai/lib/Message/Markup/ChangeLog	28 May 2006 06:30:38 -0000
2006-05-28  Wakaba  <wakaba@suika.fam.cx>

	* Atom.dis (AtomProperties): All atom property element types are added.
	(AtomDatatypes): Extensibility items are added.  Person Construct
	subelements are moved to this module.
	(person-prop, feed-prop, entry-prop, source-prop): New
	element type classes.
	(AtomIconElement, AtomLogoElement): New interfaces.
	(SimpleExtensionElements, StructuredExtensionElements): News.
	(extensionElements): New.
	(undefinedAttributes): New.

++ manakai/lib/manakai/ChangeLog	28 May 2006 06:34:52 -0000
2006-05-28  Wakaba  <wakaba@suika.fam.cx>

	* DISMarkup.dis (mv:refers): New property.
	(mv:ElementTypeAdditionalClass): New class.
	(mv:elementTypeClassName): New property.

	* daf-dtd-modules.pl (daf_dm_get_id, daf_dm_get_vid): Removed.  Names
	for modules, element types, and content models are now
	generated by |daf_dm_get_entity_name|.
	(daf_dtd_modules): Support for the |mv:ElementTypeClass| class
	is added.
	(daf_dm_add_attrdefs): Gets members from |mv:refers|
	property rather than |mv:contains|.
	(daf_dm_get_entity_name): Support for classes |mv:ElementType|,
	|mv:ElementTypeClass|, and |mv:XMLDTDModule| is added.

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24