Module: @QName: Markup|Atom @enFN: Atom DOM @enDesc: The is a language and platform independent programming language interface to Atom 1.0 documents built on the W3C Document Object Model (DOM). It defines a number of interfaces that provide convenience methods and attributes to process Atom 1.0 documents. {TODO:: - Move descriptions below to somewhere. - Formal definition for (reference to Selectors API?) is necessary. } Some attributes are defined to contain a . Multiple invocations for such an attribute don't have to return exactly same object, even if no changes are made on the underlying DOM structure. {NOTE:: The equality of objects as per the method, however, is preserved as long as the underlying DOM structure and the configuration parameters are not changed. } Methods and attributes defined in this module does support s; for example, an element node that is a child node of an entity reference node that is a child node of another element node is considered as a child element node of the other element node. As a result, applications written using this module might ignore parts of Atom documents unless they configures their XML parser not to expose entity references in the result DOM tree. @Namespace: http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup/Atom/ @DISCore:author: DISCore|Wakaba @License: license|Perl+MPL @Date: $Date: 2006/12/30 04:42:55 $ @Require: @@Module: @@@QName: Markup|common @@Module: @@@QName: MDOM|TreeCore @@@WithFor: ManakaiDOM|ManakaiDOMLatest @@Module: @@@QName: DISlib|DISMarkup @@@WithFor: ManakaiDOM|all @DefaultFor: ManakaiDOM|ManakaiDOMLatest Namespace: @atom: http://www.w3.org/2005/Atom @c: http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core# @cfg: http://suika.fam.cx/www/2006/dom-config/ @DISlib: http://suika.fam.cx/~wakaba/archive/2004/dis/ @dis: http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis-- @dlp: http://suika.fam.cx/~wakaba/archive/2004/dis/Perl# @d: http://suika.fam.cx/~wakaba/archive/2004/dom/xdt# @DOMMain: http://suika.fam.cx/~wakaba/archive/2004/dom/main# @domperl: http://suika.fam.cx/~wakaba/archive/2006/dom/perl/ @dx: http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException# @dxm: http://suika.fam.cx/~wakaba/archive/2004/dis/XML# @ecore: http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/Core/ @f: http://suika.fam.cx/~wakaba/archive/2004/dom/feature# @fe: http://suika.fam.cx/www/2006/feature/ @html: http://www.w3.org/1999/xhtml @idl: http://suika.fam.cx/~wakaba/archive/2004/dis/IDL# @kwd: http://suika.fam.cx/~wakaba/archive/2005/rfc2119/ @lang: http://suika.fam.cx/~wakaba/archive/2004/8/18/lang# @license: http://suika.fam.cx/~wakaba/archive/2004/8/18/license# @ManakaiDOM: http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom# @Markup: http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup# @MDOM: http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM. @MDOMX: http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception# @mv: http://suika.fam.cx/www/2006/05/mv/ @rel: http://www.iana.org/assignments/relation/ @s: http://suika.fam.cx/~wakaba/archive/2004/dis/Markup# @tc: http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/ @td: http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Document/ @te: http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/ @test: http://suika.fam.cx/~wakaba/archive/2004/dis/Test# @thr: http://purl.org/syndication/thread/1.0 @tx: http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/ @urigen: http://suika.fam.cx/~wakaba/archive/2005/manakai/URI/Generic/ @xml: http://www.w3.org/XML/1998/namespace ElementTypeBinding: @Name: CODE @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: dlp|BlockCode @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: Method @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|Method @@ForCheck: !=ManakaiDOM|ManakaiDOM ElementTypeBinding: @Name: Param @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|MethodParameter ElementTypeBinding: @Name: Return @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|MethodReturn ElementTypeBinding: @Name: Attr @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|Attribute @@ForCheck: !=ManakaiDOM|ManakaiDOM ElementTypeBinding: @Name: ATTR @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: @@@@: DISLang|Attribute @@@ForCheck: ManakaiDOM|ForIF @@DISCore:resourceType: @@@@: DISLang|Attribute @@@ForCheck: ManakaiDOM|ForClass @@DISCore:resourceType: @@@@: mv|AttributeType @@@ForCheck: s|ForML @@ForCheck: !=ManakaiDOM|ManakaiDOM ElementTypeBinding: @Name: Get @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|AttributeGet ElementTypeBinding: @Name: Set @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: DISLang|AttributeSet ElementTypeBinding: @Name: nullCase @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: ManakaiDOM|InCase @@Value: @@@is-null:1 ElementTypeBinding: @Name: PerlDef @ElementType: dis:Def @ShadowContent: @@ContentType: lang|Perl @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: PerlCDef @ElementType: dis:Def @ShadowContent: @@ContentType: lang|Perl ElementTypeBinding: @Name: enImplNote @ElementType: dis:ImplNote @ShadowContent: @@lang:en ElementTypeBinding: @Name: enFN @ElementType: dis:FullName @ShadowContent: @@lang:en ElementTypeBinding: @Name: IFClsETDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: @@@@: dis|MultipleResource @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML @@resourceFor: ManakaiDOM|ForIF @@resourceFor: ManakaiDOM|ForClass @@resourceFor: s|ForML @@For: ManakaiDOM|ManakaiDOM @@DISCore:resourceType: @@@@: DISLang|Interface @@@ForCheck: ManakaiDOM|ForIF @@DISCore:resourceType: @@@@: DISLang|Class @@@ForCheck: ManakaiDOM|ForClass @@Implement: @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF @@@ContentType: DISCore|TFPQNames @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest @@s:elementType: @@@@: ||+||s|ForML @@@ContentType: DISCore|TFPQNames @@@DISCore:stopISARecursive:1 @@DISCore:resourceType: @@@@: s|ElementType @@@ForCheck: s|ForML ElementTypeBinding: @Name: IFClsDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: @@@@: dis|MultipleResource @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML @@resourceFor: ManakaiDOM|ForIF @@resourceFor: ManakaiDOM|ForClass @@For: ManakaiDOM|ManakaiDOM @@DISCore:resourceType: @@@@: DISLang|Interface @@@ForCheck: ManakaiDOM|ForIF @@DISCore:resourceType: @@@@: DISLang|Class @@@ForCheck: ManakaiDOM|ForClass @@Implement: @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF @@@ContentType: DISCore|TFPQNames @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: IFClsConstructDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: @@@@: dis|MultipleResource @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML !mv|ForCM !mv|ForAG @@resourceFor: ManakaiDOM|ForIF @@resourceFor: ManakaiDOM|ForClass @@resourceFor: mv|ForCM @@resourceFor: mv|ForAG @@For: ManakaiDOM|ManakaiDOM @@DISCore:resourceType: @@@@: DISLang|Interface @@@ForCheck: ManakaiDOM|ForIF @@DISCore:resourceType: @@@@: DISLang|Class @@@ForCheck: ManakaiDOM|ForClass @@Implement: @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF @@@ContentType: DISCore|TFPQNames @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest @@DISCore:resourceType: @@@@: mv|AttributeTypeGroup @@@ForCheck: mv|ForAG @@DISCore:resourceType: @@@@: mv|ElementContentModel @@@ForCheck: mv|ForCM ElementTypeBinding: @Name: IFQName @ElementType: dis:QName @ShadowContent: @@ForCheck: ManakaiDOM|ForIF ElementTypeBinding: @Name: ClsQName @ElementType: dis:QName @ShadowContent: @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: ETRQName @ElementType: dis:QName @ShadowContent: @@ForCheck: s|ForML ElementTypeBinding: @Name: ETQName @ElementType: dis:AppName @ShadowContent: @@ForCheck: s|ForML @@ContentType: DISCore|QName ElementTypeBinding: @Name: CMQName @ElementType: dis:QName @ShadowContent: @@ForCheck: mv|ForCM ElementTypeBinding: @Name: CMName @ElementType: mv:elementContentModelName @ShadowContent: @@ForCheck: mv|ForCM ElementTypeBinding: @Name: AGQName @ElementType: dis:QName @ShadowContent: @@ForCheck: mv|ForAG ElementTypeBinding: @Name: AGName @ElementType: mv:attributeTypeGroupName @ShadowContent: @@ForCheck: mv|ForAG ElementTypeBinding: @Name: IFISA @ElementType: dis:ISA @ShadowContent: @@ForCheck: ManakaiDOM|ForIF ElementTypeBinding: @Name: ClsISA @ElementType: dis:ISA @ShadowContent: @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: disDef @ElementType: dis:Def @ShadowContent: @@ContentType: lang:dis @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: Code @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: dlp|InlineCode @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: Test @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: test|StandaloneTest @@ForCheck: ManakaiDOM|ForClass ElementTypeBinding: @Name: TestC @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: test|StandaloneTest ResourceDef: @QName: Document @AliasFor: td|Document @For: ManakaiDOM|DOM ResourceDef: @QName: Element @AliasFor: te|Element @For: ManakaiDOM|DOM ResourceDef: @QName: Attr @AliasFor: te|Attr @For: ManakaiDOM|DOM ResourceDef: @QName: DOMString @AliasFor: DOMMain|DOMString @For: ManakaiDOM|DOM ResourceDef: @QName: DOMURI @AliasFor: ManakaiDOM|ManakaiDOMURI @For: ManakaiDOM|DOM3 ResourceDef: @QName: DOMTimeStamp @AliasFor: DOMMain|DOMTimeStamp @For: ManakaiDOM|DOM2 ResourceDef: @QName: boolean @AliasFor: idl|boolean||ManakaiDOM|all ResourceDef: @QName: Node @AliasFor: tc|Node @For: ManakaiDOM|ManakaiDOM ResourceDef: @QName: NodeList @AliasFor: tc|NodeList @For: ManakaiDOM|ManakaiDOM ResourceDef: @QName: StaticNodeList @AliasFor: tc|StaticNodeList @For: ManakaiDOM|ManakaiDOM ElementTypeBinding: @Name: enDesc @ElementType: dis:Description @ShadowContent: @@lang:en ElementTypeBinding: @Name: enLN @ElementType: mv:longName @ShadowContent: @@lang:en ElementTypeBinding: @Name: TrueCase @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: ManakaiDOM:InCase @@Value: @@@@: 1 @@@ContentType: DISCore|Boolean @@Type: idl|boolean||ManakaiDOM|all ElementTypeBinding: @Name: FalseCase @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: ManakaiDOM:InCase @@Value: @@@@: 0 @@@ContentType: DISCore|Boolean @@Type: idl|boolean||ManakaiDOM|all ## -- Features ElementTypeBinding: @Name: FeatureDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: f|Feature @@For: =ManakaiDOM|all ElementTypeBinding: @Name: FeatureVerDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: f|Feature ElementTypeBinding: @Name: featureQName @ElementType: f:name @ShadowContent: @@ContentType: DISCore|QName FeatureDef: @featureQName: fe|Atom @QName: AtomFeature @FeatureVerDef: @@QName: AtomFeature10 @@Version: 1.0 @@f:instanceOf: AtomFeature @@f:requires: tx|XMLFeature30 @@enDesc: The Atom DOM, version 1.0. FeatureDef: @featureQName: fe|AtomThreading @QName: AtomThreadingFeature @FeatureVerDef: @@QName: AtomThreadingFeature10 @@Version: 1.0 @@f:instanceOf: AtomThreadingFeature @@f:requires: fe|AtomFeature10 @@enDesc: The Atom Threading Extension DOM, version 1.0. ## -- Modules ModuleSetDef: @QName: Atom @enLN: Atom @mv:version: 1.0 @mv:contains: AtomDatatypes @mv:contains: AtomProperties @mv:contains: AtomEntry @mv:contains: AtomFeed @mv:contains: AtomQName @mv:targetNamespace: atom| @mv:defaultNamespacePrefix: atom @mv:systemIdentifierBaseURI: \ ModuleDef: @QName: AtomFeed @mv:id: feed @enLN: Feed @mv:contains: feed-prop @mv:contains: atom|feed ModuleDef: @QName: AtomEntry @mv:id: entry @enLN: Entry @mv:contains: entry-prop @mv:contains: atom|entry ModuleDef: @QName: AtomProperties @mv:id: props @enLN: Properties @mv:contains: atom|content @mv:contains: atom|contributor @mv:contains: atom|category @mv:contains: atom|generator @mv:contains: atom|link @mv:contains: atom|author @mv:contains: atom|published @mv:contains: atom|updated @mv:contains: atom|icon @mv:contains: atom|id @mv:contains: atom|logo @mv:contains: atom|rights @mv:contains: atom|subtitle @mv:contains: atom|summary @mv:contains: atom|title @mv:contains: source-prop @mv:contains: atom|source ModuleDef: @QName: AtomDatatypes @mv:id: datatypes @enLN: Datatypes @mv:contains: atomNCName @mv:contains: atomMediaType @mv:contains: atomLanguageTag @mv:contains: atomUri @mv:contains: atomUriCM @mv:contains: atomEmailAddress @mv:contains: atomEmailAddressCM @mv:contains: undefinedAttributes @mv:contains: undefinedContent @mv:contains: atomCommonAttributes @mv:contains: simpleExtensionElements @mv:contains: structuredExtensionElements @mv:contains: extensionElements @mv:contains: TextAG @mv:contains: TextCM @mv:contains: atom|name @mv:contains: atom|email @mv:contains: atom|uri @mv:contains: PersonAG @mv:contains: person-prop @mv:contains: PersonCM @mv:contains: DateAG @mv:contains: DateCM ResourceDef: @QName: AtomQName @enLN: Qualified Names @mv:id: qname @For: =ManakaiDOM|ManakaiDOMLatest @DISCore:resourceType: mv|XMLDTDQNameModule @mv:contains: Atom ResourceDef: @QName: Atom10 @enLN: Atom 1.0 @mv:id: atom10 @For: =ManakaiDOM|ManakaiDOMLatest @DISCore:resourceType: mv|XMLDTDDriver @mv:refers: Atom @mv:refers: AtomQName @mv:refers: AtomDatatypes @mv:refers: AtomProperties @mv:refers: AtomEntry @mv:refers: AtomFeed ElementTypeBinding: @Name: ModuleSetDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|XMLDTDModuleSet @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: ModuleDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|XMLDTDModule @@For: =ManakaiDOM|ManakaiDOMLatest ## -- Implementation IFClsDef: @IFQName: AtomImplementation @ClsQName: ManakaiAtomImplementation @domperl:implementedByObjectsOf: c|DOMImplementation @domperl:classImplementedByObjectsOf: c|ManakaiDOMImplementation @enDesc: The interface provides convenience methods to create Atom documents. @f:provides: AtomFeature10 @f:implements: AtomFeature10 @Test: @@QName: AtomImplementation.interface.test @@PerlDef: for my $interface ( , , , ) { $test->id ($interface); $test->assert_true (->isa ($interface)); } @Test: @@QName: ImplementationRegistry.AtomImplementation.1.test @@PerlDef: require Message::Markup::Atom; my $impl = $Message::DOM::ImplementationRegistry ->get_dom_implementation ({ => '1.0', }); $test->assert_isa ($impl, ); @Test: @@QName: ImplementationRegistry.AtomImplementation.2.test @@PerlDef: require Message::Markup::Atom; my $impl = $Message::DOM::ImplementationRegistry ->get_dom_implementation ({ Core => '3.0', => '1.0', }); $test->assert_isa ($impl, ); @Test: @@QName: ImplementationRegistry.AtomImplementation.3.test @@PerlDef: require Message::Markup::Atom; my $impl = $Message::DOM::ImplementationRegistry ->get_dom_implementation ({ XML => '3.0', => '1.0', }); $test->assert_isa ($impl, ); @Method: @@Name: createAtomFeedDocument @@enDesc: Creates an Atom Feed Document object. @@Param: @@@Name: id @@@Type: DOMString @@@actualType: DOMURI @@@enDesc: The of the feed. @@Param: @@@Name: title @@@Type: DOMString @@@enDesc: The of the feed. @@@nullCase: @@@@enDesc: The implementation treate as if an empty string is specified. @@Param: @@@Name: lang @@@Type: DOMString @@@enDesc: The default natural language of the feed. @@@nullCase: @@@@enDesc: The implementation treate as if an empty string is specified. @@Return: @@@Type: AtomDocument @@@enDesc: The newly created Atom Feed Document. {P:: The returned object be a node with attributes: - ::: A containing a new element node. - ::: . } {P:: The newly created element node have attributes set as: - ::: A that contains at least a new attribute node. - ::: A containing a new element node, a new element node, and a new element node in any order. } {P:: The newly created attribute node have attributes set as: - ::: . - ::: . } {P:: The newly created element node have attributes set as: - ::: . } {P:: The newly created element node have attributes set as: - ::: . } The attribute node be attached to the element node. {P:: The newly created element node have attributes set as: - ::: A uppercase RFC 3339 representation of the time when the method is invoked. The implementation align its timezone to that of the environment in which the method is invoked. } @@@PerlDef: __DEEP{ $r = $self-> (, 'feed'); $r-> ('1.0'); my $feede = $r->; $feede-> (defined $lang ? $lang : ''); $feede-> ($id); my $titlee = $r-> (, 'title'); $titlee-> (defined $title ? $title : ''); $feede-> ($titlee); my $updatede = $r-> (, 'updated'); $updatede-> (scalar time); $feede-> ($updatede); }__; @@Test: @@@QName: AtomImplementation.createAtomFeedDocument.test @@@PerlDef: my $impl; __CODE{tc|createImplForTest:: $impl => $impl}__; $impl = $impl->get_feature ( => '1.0'); my $doc = $impl-> ('about:id', 'feed title', 'en'); $test->id ('document.interface'); $test->assert_isa ($doc, ); $test->id ('document.xmlVersion'); $test->assert_equals ($doc->, '1.0'); my $feed = $doc->; $test->id ('feed.namespaceURI'); $test->assert_equals ($feed->, ); $test->id ('feed.localName'); $test->assert_equals ($feed->, 'feed'); $test->id ('feed.lang'); $test->assert_equals ($feed-> (, 'lang'), 'en'); my $id; my $title; my $updated; for my $cn (@{$feed->}) { if ($cn-> == and $cn-> eq ) { if ($cn-> eq 'id') { $id = $cn; } elsif ($cn-> eq 'title') { $title = $cn; } elsif ($cn-> eq 'updated') { $updated = $cn; } } } $test->id ('id'); $test->assert_not_null ($id); $test->id ('id.value'); $test->assert_equals ($id->, 'about:id'); $test->id ('title'); $test->assert_not_null ($title); $test->id ('title.value'); $test->assert_equals ($title->, 'feed title'); $test->id ('title.type'); $test->assert_null ($title-> (null, 'type')); $test->id ('updated'); $test->assert_not_null ($updated); $test->id ('updated.value'); $test->assert_num_not_equals (actual_value => $updated->, expected_value => 0); @Method: @@Name: createAtomEntryDocument @@enDesc: Creates an Atom Entry Document object. @@Param: @@@Name: id @@@Type: DOMString @@@actualType: DOMURI @@@enDesc: The of the entry. @@Param: @@@Name: title @@@Type: DOMString @@@enDesc: The of the entry. @@@nullCase: @@@@enDesc: The implementation treate as if an empty string is specified. @@Param: @@@Name: lang @@@Type: DOMString @@@enDesc: The natural language of the entry. @@@nullCase: @@@@enDesc: The implementation treate as if an empty string is specified. @@Return: @@@Type: AtomDocument @@@enDesc: The newly created Atom Entry Document. {P:: The returned object be a node with attributes: - ::: A containing a new element node. - ::: . } {P:: The newly created element node have attributes set as: - ::: A that contains at least a new attribute node. - ::: A containing a new element node, a new element node, and a new element node in any order. } {P:: The newly created attribute node have attributes set as: - ::: . - ::: . } {P:: The newly created element node have attributes set as: - ::: . } {P:: The newly created element node have attributes set as: - ::: . } The attribute node be attached to the element node. {P:: The newly created element node have attributes set as: - ::: A uppercase RFC 3339 representation of the time when the method is invoked. The implementation align its timezone to that of the environment in which the method is invoked. } @@@PerlDef: __DEEP{ $r = $self-> (, 'entry'); $r-> ('1.0'); my $feede = $r->; $feede-> (defined $lang ? $lang : ''); $feede-> ($id); my $titlee = $r-> (, 'title'); $titlee-> (defined $title ? $title : ''); $feede-> ($titlee); my $updatede = $r-> (, 'updated'); $updatede-> (scalar time); $feede-> ($updatede); }__; @@Test: @@@QName: AtomImplementation.createAtomEntryDocument.test @@@PerlDef: my $impl; __CODE{tc|createImplForTest:: $impl => $impl}__; $impl = $impl->get_feature ( => '1.0'); my $doc = $impl-> ('about:id', 'entry title', 'en'); $test->id ('document.interface'); $test->assert_isa ($doc, ); $test->id ('document.xmlVersion'); $test->assert_equals ($doc->, '1.0'); my $feed = $doc->; $test->id ('feed.namespaceURI'); $test->assert_equals ($feed->, ); $test->id ('feed.localName'); $test->assert_equals ($feed->, 'entry'); $test->id ('feed.lang'); $test->assert_equals ($feed-> (, 'lang'), 'en'); my $id; my $title; my $updated; for my $cn (@{$feed->}) { if ($cn-> == and $cn-> eq ) { if ($cn-> eq 'id') { $id = $cn; } elsif ($cn-> eq 'title') { $title = $cn; } elsif ($cn-> eq 'updated') { $updated = $cn; } } } $test->id ('id'); $test->assert_not_null ($id); $test->id ('id.value'); $test->assert_equals ($id->, 'about:id'); $test->id ('title'); $test->assert_not_null ($title); $test->id ('title.value'); $test->assert_equals ($title->, 'entry title'); $test->id ('title.type'); $test->assert_null ($title-> (null, 'type')); $test->id ('updated'); $test->assert_not_null ($updated); $test->id ('updated.value'); $test->assert_num_not_equals (actual_value => $updated->, expected_value => 0); @enImplNote: @@ddid: imt @@@: {ISSUE:: The attribute of the created document should be set to ? } @CODE: @@QName: returnChildElement @@enDesc: {P:: The algorithm to child element> of the element node is defined as: = If contains one or more child element node whose element type is , it return the first such element node in document order. {OLI:: Otherwise, {OLI:: If the configuration parameter is set to , = Create an element node whose element type is . = Append to as if the method were called for with its parameter set to . Note that this might throw an exception. = Then, be returned. } = Otherwise, be returned. } } @@PerlDef: __DEEP{ E: { no warnings 'uninitialized'; for my $__el (@{$node->}) { if ($__el-> == and $__el-> eq $localName and $__el-> eq $namespaceURI) { $r = $__el; last E; } } my $od = $node->; if ($od-> -> ()) { $r = $od-> ($namespaceURI, $localName); $node-> ($r); } } # E }__; @CODE: @@QName: returnChildElementList @@enDesc: {P:: The algorithm to child element list> of the element node is defined as: = Creates an empty object that is read-only. = For each child element node of , add that element node to in document order if its element type is . = Returns . } @@PerlDef: __DEEP{ no warnings 'uninitialized'; __CODE{tc|createStaticNodeList:: $r => $r}__; for my $__el (@{$node->}) { if ($__el-> == and $__el-> eq $localName and $__el-> eq $namespaceURI) { push @{$r}, $__el; } } }__; @CODE: @@QName: getReflectStringValue @@enDesc: {P:: If a DOM attribute is defined to child element> of the node , the getter of the attribute return the value defined by the algorithm: = If the contains a child element node whose element type is , it return the value of the . = Otherwise, it return . } @@PerlDef: __DEEP{ E: { no warnings 'uninitialized'; for my $__cn (@{$node->}) { if ($__cn-> == and $__cn-> eq $localName and $__cn-> eq $namespaceURI) { $r = $__cn->; last E; } } $r = null; } # E }__; @CODE: @@QName: setReflectStringValue @@enDesc: {P:: If a DOM attribute is defined to child element> of the node , the setter of the attribute modify the node as defined by the algorithm: = If the given value is , any child elements whose element types are be removed from the list of child nodes. = Otherwise, if there is no child element node in the child node list of the , it create an element node whose element type is , append it to the as if the method were invoked, and set the of the newly created element node to the given value. = Otherwise, it set the of the first child element node in the child node list of the to the given value. } {NOTE:: It might throw an exception. } @@PerlDef: __DEEP{ no warnings 'uninitialized'; if (defined $given) { my $__target; E: { for my $__cl (@{$node->}) { if ($__cl-> == and $__cl-> eq $localName and $__cl-> eq $namespaceURI) { $__target = $__cl; last E; } } $__target = $node-> -> ($namespaceURI, $localName); $node-> ($__target); } # E $__target-> ($given); } else { my @__remove; for my $__cl (@{$node->}) { if ($__cl-> == and $__cl-> eq $localName and $__cl-> eq $namespaceURI) { push @__remove, $__cl; } } $node-> ($_) for @__remove; } }__; @CODE: @@QName: getReflectAttrStringValue @@enDesc: {P:: If a DOM attribute is defined to attribute> of the node , the getter of the attribute return the value defined by the algorithm: = If the contains an attribute node whose name is , it return the of the . = If a default value is explicitly defined where this algorithm is referenced, it return the default value. = Otherwise, it return . } @@PerlDef: __DEEP{ E: { $r = $node-> ($namespaceURI, $localName); last E if defined $r; $r = $defaultValue; } # E }__; @CODE: @@QName: setReflectAttrStringValue @@enDesc: {P:: If a DOM attribute is defined to attribute> of the node , the setter of the attribute modify the node as defined by the algorithm: = If the given value is , it remove the attribute node, if any, from the list of attribute nodes of . = Otherwise, it set the attribute node value to the given value as if the method were invoked. } {NOTE:: It might throw an exception. } @@PerlDef: __DEEP{ if (defined $given) { $node-> ($namespaceURI, $localName, $given); } else { $node-> ($namespaceURI, $localName); } }__; @CODE: @@QName: getReflectURIValue @@enDesc: {P:: If a DOM attribute is defined to child element> of the node , the getter of the attribute return the value defined by the algorithm: = Get the string that would be returned if the DOM attribute child element> of the . = If the is , it return . = Otherwise, if the of the node from which the comes is , it return the . = Otherwise, a string that would be returned by the method on a object whose value equals to with the parameter set to the of the node from which the comes and the parameter set to . } @@PerlDef: __DEEP{ E: { no warnings 'uninitialized'; for my $__cn (@{$node->}) { if ($__cn-> == and $__cn-> eq $localName and $__cn-> eq $namespaceURI) { my $__ref_buri = $__cn->; if (defined $__ref_buri) { $r = $node-> -> -> ($__cn->) -> ($__ref_buri) ->; } else { $r = $__cn->; } last E; } } $r = null; } # E }__; @CODE: @@QName: setReflectURIValue @@enDesc: If a DOM attribute is defined to child element> of the node , the setter of the attribute modify the node as if the DOM attribute child element> of the . {NOTE:: It might throw an exception. } @@PerlDef: __CODE{setReflectStringValue}__; @CODE: @@QName: getReflectAttrURIValue @@enDesc: {P:: If a DOM attribute is defined to attribute> of the node , the getter of the attribute return the value defined by the algorithm: = Get the string that would be returned if the DOM attribute attribute> of the . = If the is , it return . = Otherwise, if the of the node from which the comes is , it return the . = Otherwise, a string that would be returned by the method on a object whose value equals to with the parameter set to the of the node from which the comes and the parameter set to . } @@PerlDef: __DEEP{ my $__attr = $node-> ($namespaceURI, $localName); if (defined $__attr) { my $__attr_base = $__attr->; if (defined $__attr_base) { $r = $node-> -> -> ($__attr->) -> ($__attr_base) ->; } else { $r = $__attr->; } } else { $r = null; } }__; @CODE: @@QName: setReflectAttrURIValue @@enDesc: If a DOM attribute is defined to attribute> of the node , the setter of the DOM attribute modify the node as if the DOM attribute attribute> of the . {NOTE:: It might throw an exception. } @@PerlDef: __CODE{setReflectAttrStringValue}__; @enImplNote: @@ddid: datereflect @@@: {ISSUE:: attribute should be provided for published and created? } @CODE: @@QName: getReflectAttrNonNegativeIntegerValue @@enDesc: {P:: If a DOM attribute is defined to attribute> of the node , the getter of the attribute return the value defined by the algorithm: {OLI:: If the contains an attribute node whose name is : = If the of the is one or more sequence of digits (, , ..., ) optionally preceding by a , then the attribute getter return a value by interpreting the of the as a decimal number. } = If a default value is explicitly defined where this algorithm is referenced, it return the default value. = Otherwise, it return a binding-specific default value, if it is defined by the specification of the binding, or . } {NOTE:: In Atom Threading Extension , the and leading s are prohibitted. } @@PerlDef: __DEEP{ E: { $r = $node-> ($namespaceURI, $localName); if (defined $r) { if ($r =~ /\A\+?([0-9]+)\z/) { $r = 0+$1; last E; } } $r = $defaultValue; $r = -1 unless defined $r; } # E }__; @CODE: @@QName: setReflectAttrNonNegativeIntegerValue @@enDesc: {P:: If a DOM attribute is defined to attribute> of the node , the setter of the attribute modify the node as defined by the algorithm: = If the given value is or one of binding-specific default values, if any, as defined by the specification of the binding, it remove the attribute node, if any, from the list of attribute nodes of . = Otherwise, it set the attribute node value to a string representation of the given value as if the method were invoked. The string representation be a decimal number consist of one or more sequence of digits (, , ..., ) any leading . The be omitted. } {NOTE:: It might throw an exception. } @@PerlDef: __DEEP{ if (defined $given and $given >= 0) { $node-> ($namespaceURI, $localName, 0+$given); } else { $node-> ($namespaceURI, $localName); } }__; ##AtomImplementation IFClsDef: @IFQName: AtomDocument @ClsQName: ManakaiAtomDocument @domperl:implementedByObjectsOf: Document @domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument @f:implements: AtomFeature10 @enDesc: If the feature version is supported, a object whose 's , if any, is at least at the time of creation also implement the interface. Other objects also implement the interface. @Test: @@QName: createDocument.AtomDocument.test @@PerlDef: my $impl; __CODE{tc|createImplForTest:: $impl => $impl}__; my $doc = $impl-> (, 'unknown'); $test->id ('interface'); $test->assert_isa ($doc, ); ##AtomDocument AGDef: @QName: atomCommonAttributes @enFN: common attributes @mv:attributeTypeGroupName: common @mv:refers: Atom @ATDef: @@mv:attributeTypeName: xml|base @@mv:attributeValueType: atomUri @ATDef: @@mv:attributeTypeName: xml|lang @@mv:attributeValueType: atomLanguageTag @mv:refers: undefinedAttributes ##atomCommonAttributes STDef: @QName: atomNCName @mv:datatypeEntityName: NCName #subsetOf: xsd|string #minLength, pattern STDef: @QName: atomMediaType @mv:datatypeEntityName: MediaType #subsetOf xsd|string # pattern STDef: @QName: atomLanguageTag @mv:datatypeEntityName: LangaugeTag #subsetOf: xsd|string #pattern STDef: @QName: atomUri @mv:datatypeEntityName: URI #aliasfor text STCDef: @QName: atomUriCM @mv:elementContentModelName: URI @cm: (dxm|PCDATA||ManakaiDOM|all)* STDef: @QName: atomEmailAddress @mv:datatypeEntityName: EmailAddress #subsetOf xsd|string #pattern STCDef: @QName: atomEmailAddressCM @mv:elementContentModelName: EmailAddress @cm: (dxm|PCDATA||ManakaiDOM|all)* ElementTypeBinding: @Name: AGDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|AttributeTypeGroup @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: ATDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|AttributeType @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: ECDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|ElementTypeClass @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: EMDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|ElementTypeClassMix @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: STDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|XMLDTDDatatypeEntity @@For: =ManakaiDOM|ManakaiDOMLatest ElementTypeBinding: @Name: STCDef @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: mv|ElementContentModel @@For: =ManakaiDOM|ManakaiDOMLatest IFClsDef: @IFQName: AtomElement @ClsQName: ManakaiAtomElement @IFISA: Element @ClsISA: te|ManakaiDOMElement @f:implements: AtomFeature10 @s:elementType: AnyAtomElement||ManakaiDOM|all @enDesc: The interface provides convenience methods and attributes for Atom elements. If the feature version is supported, an object whose namespace URI is also implement the interface. Other objects also implement the interface. @enImplNote: @@ddid: todo @@@: {TODO:: Need and attributes from SVG? } @Test: @@QName: AtomElement.interface.test @@PerlDef: for my $interface ( , , , , ) { $test->id ($interface); $test->assert_true (->isa ($interface)); } @Test: @@QName: createElementNS.AtomElement.test @@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'unknown'); $test->assert_isa ($el, ); ##AtomElement ResourceDef: @QName: AnyAtomElement @DISCore:resourceType: s|AnyElementInNS @AppName: @@@: atom|* @@ContentType: DISCore|QName @ForCheck: =ManakaiDOM|all ElementTypeBinding: @Name: cm @ElementType: mv:elementContentModel @ShadowContent: @@ContentType: lang|dcmodel IFClsConstructDef: @IFQName: AtomTextConstruct @ClsQName: ManakaiAtomTextConstruct @AGQName: TextAG @AGName: text @CMQName: TextCM @CMName: text @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: dxm|ANY||ManakaiDOM|all @enImplNote: @@ddid:cm @@@: {TODO:: (dxm|PCDATA||ManakaiDOM|all | html|div)* } @enDesc: The interface provides convenience methods and attributes for nodes classfied to the Text constructs. Other objects also implement the interface. A Text construct contains human-readable text, usually in small quantities. The content of a Text construct is Language-Sensitive. @ATTR: @@Name: type @@enDesc: The attribute of the element. It attribute> of the node. The default value be . @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $r => $r, $defaultValue => 'text', }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $given => $given, }__; @Attr: @@Name: container @@enDesc: The container element that contains the actual content of the construct. @@Type: Element @@Get: @@@enDesc: If the is , the getter child element>. Otherwise, the object itself be returned. @@@nullCase: @@@@enDesc: If the is and the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __DEEP{ my $type = $self->; if ($type eq 'xhtml') { __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'div', $r => $r, }__; } else { $r = $self; } }__; @@Test: @@@QName: AtomTextConstruct.container.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'title'); $test->id ('no'); $test->assert_equals ($el->, $el); $test->id ('text'); $el-> ('text'); $test->assert_equals ($el->, $el); $test->id ('html'); $el-> ('html'); $test->assert_equals ($el->, $el); $test->id ('xhtml'); $el-> ('xhtml'); $test->assert_null ($el->); $doc-> -> ( => true); my $con = $el->; $test->id ('xhtml.create'); $test->assert_not_equals ($con, $el); $test->id ('xhtml.namespaceURI'); $test->assert_equals ($con->, ); $test->id ('xhtml.localName'); $test->assert_equals ($con->, 'div'); $test->id ('xhtml.parentNode'); $test->assert_equals ($con->, $el); $test->id ('xhtml.2'); $test->assert_equals ($el->, $con); ##AtomTextConstruct IFClsConstructDef: @IFQName: AtomPersonConstruct @ClsQName: ManakaiAtomPersonConstruct @AGQName: PersonAG @AGName: person @CMQName: PersonCM @CMName: person @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (person-prop+) @enDesc: The interface provides convenience methods and attributes for nodes classfied to the Person constructs. Other objects also implement the interface. A Person construct is an element that describes a person, corporation, or similar entity. @Attr: @@Name: name @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'name', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'name', $given => $given, }__; @Attr: @@Name: nameElement @@enDesc: The child element of the node. @@Type: AtomNameElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'name', $r => $r, }__; @Attr: @@Name: uri @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'uri', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'uri', $given => $given, }__; @Attr: @@Name: email @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'email', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'email', $given => $given, }__; ##AtomPersonConstruct ECDef: @QName: person-prop @mv:elementTypeClassName: person-prop @mv:refers: atom|name @mv:refers: atom|uri @mv:refers: atom|email @mv:refers: extensionElements IFClsConstructDef: @IFQName: AtomDateConstruct @ClsQName: ManakaiAtomDateConstruct @AGQName: DateAG @AGName: date @CMQName: DateCM @CMName: date @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (dxm|PCDATA||ManakaiDOM|all)* @enImplNote: @@ddid: cm @@@: {TODO:: xsd|dateTime } @enDesc: The interface provides convenience methods and attributes for nodes classfied to the Date constructs. Other objects also implement the interface. A Date construct is an element whose content is a date that conforms to the uppercase version of the RFC 3339 format. @Attr: @@Name: value @@enDesc: The date value of the node. {ISSUE:: - Out of range of platform DOMTimeStamp type - Errorous xsd:dateTime - Leap seconds - Timezone - Precision } @@Type: DOMTimeStamp @@Get: @@@enDesc: {TODO:: Define } @@@PerlDef: my $value = $self->; if ($value =~ /\A(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)(\.\d+)? (?:Z|([+-]\d+):(\d+))\z/x) { require Time::Local; $r = Time::Local::timegm_nocheck ($6, defined $8 ? $8 > 0 ? $5 - $9 : $5 + $9 : $5, defined $8 ? $4 - $8 : $4, $3, $2-1, $1-1900); $r += "0$7" if defined $7; } else { $r = 0; } @@Set: @@@enDesc: {TODO:: Define } @@@NodeReadOnlyError: @@@PerlDef: __DEEP{ my @value = gmtime (int ($given / 1)); my $value = sprintf '%04d-%02d-%02dT%02d:%02d:%02d', $value[5] + 1900, $value[4] + 1, $value[3], $value[2], $value[1], $value[0]; my $f = $given % 1; $value .= substr (''.$f, 1) if $f; $value .= 'Z'; $self-> ($value); }__; @enImplNote: @@ddid: todo @@@: {TODO:: Access to components, especially timezone and -00:00. } ##AtomDateConstruct ECDef: @QName: feed-prop @mv:elementTypeClassName: feed-prop @mv:refers: atom|author @mv:refers: atom|category @mv:refers: atom|contributor @mv:refers: atom|generator @mv:refers: atom|icon @mv:refers: atom|id @mv:refers: atom|link @mv:refers: atom|logo @mv:refers: atom|rights @mv:refers: atom|subtitle @mv:refers: atom|title @mv:refers: atom|updated @mv:refers: extensionElements IFClsETDef: @IFQName: AtomFeedElement @ETQName: atom|feed @ETRQName: atom|feed @ClsQName: ManakaiAtomFeedElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (feed-prop+, atom|entry*) @enDesc: The element is the document element of an Atom Feed Document. {ISSUE:: children be placed after any other elements. Attributes creating children should insert them before any entries? } @Attr: @@Name: authorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'author', $r => $r, }__; @@Test: @@@QName: AtomFeedElement.authorElements.empty.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'feed'); my $list = $el->; $test->id ('interface'); $test->assert_isa ($list, ); $test->id ('length'); $test->assert_num_equals (actual_value => 0+@{$list}, expected_value => 0); $test->id ('readOnly'); $test->assert_false ($list->); @@Test: @@@QName: AtomFeedElement.authorElements.two.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $e1 = $doc-> (, 'feed'); my $a1 = $doc-> (, 'author'); $e1-> ($a1); my $a2 = $doc-> (, 'author'); $e1-> ($a2); my $list = $e1->; my $a3 = $doc-> (, 'author'); $e1-> ($a3); $test->id ('length'); $test->assert_num_equals (actual_value => 0+@{$list}, expected_value => 2); $test->id (0); $test->assert_equals ($list->[0], $a1); $test->id (1); $test->assert_equals ($list->[1], $a2); @Attr: @@Name: categoryElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'category', $r => $r, }__; @Attr: @@Name: contributorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'contributor', $r => $r, }__; @Attr: @@Name: generatorElement @@enDesc: The child element of the node. @@Type: AtomGeneratorElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'generator', $r => $r, }__; @@Test: @@@QName: AtomFeedElement.generatorElement.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'feed'); $test->id ('no'); $test->assert_null ($el->); $doc-> -> ( => true); my $ge = $el->; $test->id ('create.interface'); $test->assert_isa ($ge, ); $test->id ('create.namespaceURI'); $test->assert_equals ($ge->, ); $test->id ('create.localName'); $test->assert_equals ($ge->, 'generator'); $test->id ('has'); my $ge2 = $el->; $test->assert_equals ($ge2, $ge); $test->id ('multiple'); $el-> ($doc-> (, 'generator')); my $ge3 = $el->; $test->assert_equals ($ge3, $ge); @Attr: @@Name: icon @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'icon', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'icon', $given => $given, }__; @@Test: @@@QName: AtomFeedElement.icon.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'feed'); $test->id ('default'); $test->assert_null ($el->); $test->id ('set'); $el-> ('http://example.com/'); $test->assert_equals ($el->, 'http://example.com/'); $test->id ('relative'); $el-> ('favicon.ico'); $test->assert_equals ($el->, 'favicon.ico'); $test->id ('relative.base'); $el-> (, 'xml:base', 'http://www.example.com/'); $test->assert_equals ($el->, 'http://www.example.com/favicon.ico'); $test->id ('multiple'); $el-> ($doc-> (, 'icon')) -> ('/default.ico'); # ignored $test->assert_equals ($el->, 'http://www.example.com/favicon.ico'); $test->id ('remove'); $el-> (null); $test->assert_null ($el->); @Attr: @@Name: id @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'id', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectStringValue:: $node => $self, $namespaceURI => {}, $localName => 'id', $given => $given, }__; @@Test: @@@QName: AtomFeedElement.id.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'feed'); $test->id ('default'); $test->assert_null ($el->); $test->id ('set'); $el-> ('http://example.com/'); $test->assert_equals ($el->, 'http://example.com/'); $test->id ('relative'); $el-> ('favicon.ico'); $test->assert_equals ($el->, 'favicon.ico'); $test->id ('relative.base'); $el-> (, 'xml:base', 'http://www.example.com/'); $test->assert_equals ($el->, 'favicon.ico'); $test->id ('multiple'); $el-> ($doc-> (, 'id')) -> ('/default.ico'); # ignored $test->assert_equals ($el->, 'favicon.ico'); $test->id ('remove'); $el-> (null); $test->assert_null ($el->); @Attr: @@Name: linkElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'link', $r => $r, }__; @Attr: @@Name: logo @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{getReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'logo', $r => $r, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectURIValue:: $node => $self, $namespaceURI => {}, $localName => 'logo', $given => $given, }__; @Attr: @@Name: rightsElement @@enDesc: The child element of the node. @@Type: AtomRightsElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'rights', $r => $r, }__; @Attr: @@Name: subtitleElement @@enDesc: The child element of the node. @@Type: AtomSubtitleElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'subtitle', $r => $r, }__; @Attr: @@Name: titleElement @@enDesc: The child element of the node. @@Type: AtomTitleElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'title', $r => $r, }__; @Attr: @@Name: updatedElement @@enDesc: The child element of the node. @@Type: AtomUpdatedElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'updated', $r => $r, }__; @Attr: @@Name: entryElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'entry', $r => $r, }__; @Method: @@Name: getEntryElementById @@enDesc: Returns an node selected by its . @@Param: @@@Name: idArg @@@Type: DOMString @@@actualType: DOMURI @@@enDesc: The identifier of the entry. @@Return: @@@Type: AtomEntryElement @@@enDesc: The element whose identifier equals to . It return the first child element node in document order whose element type is and whose first child element node in document order with element type has equals to , if any, or . @@@nullCase: @@@@enDesc: If no matching element. @@@PerlDef: E: { no warnings 'uninitialized'; for my $cn (@{$self->}) { if ($cn-> == and $cn-> eq 'entry' and $cn-> eq ) { if ($cn-> eq $idArg) { $r = $cn; last E; } } } } # E @Method: @@Name: addNewEntry @@enDesc: Creates an element node and appends to the node. @@Param: @@@Name: id @@@Type: DOMString @@@actualType: DOMURI @@@enDesc: The of the entry. @@Param: @@@Name: title @@@Type: DOMString @@@enDesc: The of the entry. @@@nullCase: @@@@enDesc: The implementation treate as if an empty string is specified. @@Param: @@@Name: lang @@@Type: DOMString @@@enDesc: The natural language of the entry. @@@nullCase: @@@@enDesc: No explicit language specification is added. @@Return: @@@Type: AtomEntryElement @@@enDesc: The newly created element. {P:: The newly created element node have attributes set as: - ::: A that contains at least a new attribute node except when the parameter is set to . - ::: A containing a new element node, a new element node, and a new element node in any order. } This element node be appended to the node as if the method were invoked on the node and be returned by the method. Note that an exception might be thrown during this course. {P:: The attribute node, if created, have attributes set as: - ::: . - ::: . } {P:: The newly created element node have attributes set as: - ::: . } {P:: The newly created element node have attributes set as: - ::: . } The attribute node be attached to the element node. {P:: The newly created element node have attributes set as: - ::: A uppercase RFC 3339 representation of the time when the method is invoked. The implementation align its timezone to that of the environment in which the method is invoked. } @@@PerlDef: __DEEP{ my $od = $self->; $r = $od-> (, 'entry'); $r-> ($lang) if defined $lang; $r-> ($id); my $titlee = $od-> (, 'title'); $titlee-> (defined $title ? $title : ''); $r-> ($titlee); my $updatede = $od-> (, 'updated'); $updatede-> (scalar time); $r-> ($updatede); $self-> ($r); }__; @@Test: @@@QName: AtomFeedElement.addNewEntry.1.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $feed = $doc-> (, 'feed'); my $ent = $feed-> ('about:id', 'entry title', 'en'); $test->id ('entry.interface'); $test->assert_isa ($ent, ); $test->id ('entry.namespaceURI'); $test->assert_equals ($ent->, ); $test->id ('entry.localName'); $test->assert_equals ($ent->, 'entry'); $test->id ('entry.lang'); $test->assert_equals ($ent-> (, 'lang'), 'en'); my $id; my $title; my $updated; for my $cn (@{$ent->}) { if ($cn-> == and $cn-> eq ) { if ($cn-> eq 'id') { $id = $cn; } elsif ($cn-> eq 'title') { $title = $cn; } elsif ($cn-> eq 'updated') { $updated = $cn; } } } $test->id ('id'); $test->assert_not_null ($id); $test->id ('id.value'); $test->assert_equals ($id->, 'about:id'); $test->id ('title'); $test->assert_not_null ($title); $test->id ('title.value'); $test->assert_equals ($title->, 'entry title'); $test->id ('title.type'); $test->assert_null ($title-> (null, 'type')); $test->id ('updated'); $test->assert_not_null ($updated); $test->id ('updated.value'); $test->assert_num_not_equals (actual_value => $updated->, expected_value => 0); $test->id ('parent'); $test->assert_equals ($ent->, $feed); @@Test: @@@QName: AtomFeedElement.addNewEntry.2.test @@@enDesc: . @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $feed = $doc-> (, 'feed'); my $ent = $feed-> ('about:id', 'entry title', null); $test->id ('entry.lang'); $test->assert_null ($ent-> (, 'lang')); ##AtomFeedElement ECDef: @QName: entry-prop @mv:elementTypeClassName: entry-prop @mv:refers: atom|author @mv:refers: atom|category @mv:refers: atom|content @mv:refers: atom|contributor @mv:refers: atom|id @mv:refers: atom|link @mv:refers: atom|published @mv:refers: atom|rights @mv:refers: atom|source @mv:refers: atom|summary @mv:refers: atom|title @mv:refers: atom|updated @mv:refers: extensionElements IFClsETDef: @IFQName: AtomEntryElement @ETQName: atom|entry @ETRQName: atom|entry @ClsQName: ManakaiAtomEntryElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (entry-prop+) @enDesc: The element represents an individual entry, acting as a container for metadata and data associated with the entry. @Attr: @@Name: authorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.authorElements.get @Attr: @@Name: entryAuthorElements @@enDesc: A static list of elements for the node. @@Type: StaticNodeList @@Get: @@@enDesc: = If the node contains one or more element node in its child node list, then it return a that would be returned by the attribute of the node. = Otherwise, if the node contains a element node in its child node list, then it return a that would be returned by the attribute of that node, unless its is zero. = Otherwise, if the of the node is a element node, then it return a that would be returned by the attribute of that node. = Otherwise, it return a whose is zero. @@@PerlDef: __DEEP{ E: { no warnings 'uninitialized'; __CODE{tc|createStaticNodeList:: $r => $r}__; my $source; for my $cn (@{$self->}) { if ($cn-> == and $cn-> eq ) { if ($cn-> eq 'author') { push @{$r}, $cn; } elsif ($cn-> eq 'source') { $source = $cn; } } } last E unless @{$r} == 0; if (defined $source) { $r = $source->; } last E unless @{$r} == 0; my $parent = $self->; if (defined $parent and $parent-> == and $parent-> eq and $parent-> eq 'feed') { $r = $parent->; } } # E }__; @@Test: @@@QName: AtomEntryElement.entryAuthorElements.1.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); $test->id ('empty'); my $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0); $test->id ('one'); $el-> ($doc-> (, 'author')); $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); $test->id ('source'); for ($el-> ($doc-> (, 'source'))) { $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); } $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); $test->id ('parent'); for ($doc-> (, 'feed')) { $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($el); } $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 1); @@Test: @@@QName: AtomEntryElement.entryAuthorElements.2.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); $test->id ('source'); for ($el-> ($doc-> (, 'source'))) { $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); } my $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 2); $test->id ('parent'); for ($doc-> (, 'feed')) { $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($el); } $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 2); @@Test: @@@QName: AtomEntryElement.entryAuthorElements.3.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); $test->id ('source'); for ($el-> ($doc-> (, 'source'))) { # empty } my $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0); $test->id ('parent'); my $parent; for ($doc-> (, 'feed')) { $parent = $_; $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($el); } $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 3); @@Test: @@@QName: AtomEntryElement.entryAuthorElements.4.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); $test->id ('parent'); my $parent; for ($doc-> (, 'feed')) { $parent = $_; $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($doc-> (, 'author')); $_-> ($el); } my $list = $el->; $test->assert_num_equals (actual_value => 0+@$list, expected_value => 3); @Attr: @@Name: categoryElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.categoryElements.get @Attr: @@Name: contentElement @@enDesc: The child element of the node. @@Type: AtomContentElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'content', $r => $r, }__; @Attr: @@Name: contributorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.contributorElements.get @Attr: @@Name: id @@enDesc: The value of the feed. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.id.get @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.id.set @Attr: @@Name: linkElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.linkElements.get @Attr: @@Name: publishedElement @@enDesc: The child element of the node. @@Type: AtomPublishedElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'published', $r => $r, }__; @Attr: @@Name: rightsElement @@enDesc: The child element of the node. @@Type: AtomRightsElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.rightsElement.get @Attr: @@Name: entryRightsElement @@enDesc: The element for the node. @@Type: AtomRightsElement @@Get: @@@enDesc: = If the node contains a element node in its child node list, then it return the first such a node in document order. = Otherwise, if the of the node is a element node, then it return an that would be returned by the attribute of that node, except when it is . {OLI:: Otherwise, {OLI:: If the configuration parameter is set to , = Create an element node whose element type is . = Append to this node as if the method were called for the node with its parameter set to . Note that this might throw an exception. = Then, be returned. } = Otherwise, it return . } @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __DEEP{ E: { no warnings 'uninitialized'; for my $cn (@{$self->}) { if ($cn-> == and $cn-> eq 'rights' and $cn-> eq ) { $r = $cn; last E; } } my $parent = $self->; if (defined $parent and $parent-> == and $parent-> eq and $parent-> eq 'feed') { for my $cn (@{$parent->}) { if ($cn-> == and $cn-> eq 'rights' and $cn-> eq ) { $r = $cn; last E; } } } my $od = $self->; if ($od-> -> ()) { $r = $od-> (, 'rights'); $self-> ($r); } } # E }__; @@Test: @@@QName: AtomEntryElement.entryRightsElement.1.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); $test->id ('no'); my $rights = $el->; $test->assert_null ($rights); $doc-> -> ( => true); $rights = $el->; $test->id ('created.namespaceURI'); $test->assert_equals ($rights->, ); $test->id ('created.localName'); $test->assert_equals ($rights->, 'rights'); $test->id ('created.parentNode'); $test->assert_equals ($rights->, $el); $test->id ('get'); my $rights2 = $el->; $test->assert_equals ($rights2, $rights); @@Test: @@@QName: AtomEntryElement.entryRightsElement.2.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'entry'); my $feed = $doc-> (, 'feed'); $feed-> ($el); my $rights = $doc-> (, 'rights'); $feed-> ($rights); $test->id ('get'); my $rights2 = $el->; $test->assert_equals ($rights2, $rights); @Attr: @@Name: sourceElement @@enDesc: The child element of the node. @@Type: AtomSourceElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'source', $r => $r, }__; @Attr: @@Name: summaryElement @@enDesc: The child element of the node. @@Type: AtomSummaryElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'summary', $r => $r, }__; @Attr: @@Name: titleElement @@enDesc: The child element of the node. @@Type: AtomTitleElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.titleElement.get @Attr: @@Name: updatedElement @@enDesc: The child element of the node. @@Type: AtomUpdatedElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.updatedElement.get ##AtomEntryElement IFClsETDef: @IFQName: AtomIdElement @ETQName: atom|id @ETRQName: atom|id @ClsQName: ManakaiAtomIdElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: atomUriCM ##AtomIdElement IFClsETDef: @IFQName: AtomIconElement @ETQName: atom|icon @ETRQName: atom|icon @ClsQName: ManakaiAtomIconElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: atomUriCM ##AtomIconElement IFClsETDef: @IFQName: AtomNameElement @ETQName: atom|name @ETRQName: atom|name @ClsQName: ManakaiAtomNameElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 # no common attribs @cm: TextCM @mv:refers: Atom ##AtomNameElement IFClsETDef: @IFQName: AtomUriElement @ETQName: atom|uri @ETRQName: atom|uri @ClsQName: ManakaiAtomUriElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 # no common attribs @cm: atomUriCM @mv:refers: Atom ##AtomUriElement IFClsETDef: @IFQName: AtomEmailElement @ETQName: atom|email @ETRQName: atom|email @ClsQName: ManakaiAtomEmailElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 # no common attribs @cm: atomEmailAddressCM @mv:refers: Atom ##AtomEmailElement IFClsETDef: @IFQName: AtomLogoElement @ETQName: atom|logo @ETRQName: atom|logo @ClsQName: ManakaiAtomLogoElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: atomUriCM ##AtomLogoElement IFClsETDef: @IFQName: AtomContentElement @ETQName: atom|content @ETRQName: atom|content @ClsQName: ManakaiAtomContentElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: dxm|ANY||ManakaiDOM|all @enDesc: The element either contains or links to the content of the entry. @ATTR: @@Name: type @@enDesc: The type of the element. It attribute> of the node. It default value be if and only if there is no attribute on the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $r => $r, $defaultValue => { $self-> (null, 'src') ? null : 'text' }, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $given => $given, }__; @@Test: @@@QName: AtomContentElement.type.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'content'); $test->id ('default.no.src'); $test->assert_equals ($el->, 'text'); $test->id ('default.src'); $el-> ('http://atom.example/'); $test->assert_null ($el->); $test->id ('set.xhtml'); $el-> ('xhtml'); $test->assert_equals ($el->, 'xhtml'); $test->id ('set.imt'); $el-> ('application/xml'); $test->assert_equals ($el->, 'application/xml'); $test->id ('remove'); $el-> (null); $test->assert_null ($el->); @ATTR: @@Name: src @@enDesc: The source of the remote content of the element. It attribute> of the node. @@Type: DOMString @@Type: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'src', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'src', $given => $given, }__; @@Test: @@@QName: AtomContentElement.src.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'content'); $test->id ('default'); $test->assert_null ($el->); $test->id ('set'); $el-> ('http://atom.example/'); $test->assert_equals ($el->, 'http://atom.example/'); $test->id ('set.relative'); $el-> ('atom'); $test->assert_equals ($el->, 'atom'); $test->id ('set.relative.base'); $el-> (, 'xml:base', 'http://atom.example/'); $test->assert_equals ($el->, 'http://atom.example/atom'); $test->id ('remove'); $el-> (null); $test->assert_null ($el->); @Attr: @@Name: container @@enDesc: The container element that contains the actual content for the node. @@Type: Element @@Get: @@@enDesc: - If the is , it child element>. - Otherwise, if the is , it return . - Otherwise, it return the node itself. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@PerlDef: __DEEP{ my $type = $self->; if (defined $type and $type eq 'xhtml') { __UNDEEP{ __CODE{returnChildElement:: $node => $self, $namespaceURI => {}, $localName => 'div', $r => $r, }__; }__; } elsif (not $self-> (null, 'src')) { $r = $self; } }__; @@Test: @@@QName: AtomContentElement.container.1.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'content'); $test->id ('no'); $test->assert_equals ($el->, $el); $test->id ('application/smil'); $el-> ('application/smil'); $test->assert_equals ($el->, $el); $test->id ('text'); $el-> ('text'); $test->assert_equals ($el->, $el); $test->id ('html'); $el-> ('html'); $test->assert_equals ($el->, $el); $test->id ('xhtml'); $el-> ('xhtml'); $test->assert_null ($el->); $doc-> -> ( => true); my $con = $el->; $test->id ('xhtml.create'); $test->assert_not_equals ($con, $el); $test->id ('xhtml.namespaceURI'); $test->assert_equals ($con->, ); $test->id ('xhtml.localName'); $test->assert_equals ($con->, 'div'); $test->id ('xhtml.parentNode'); $test->assert_equals ($con->, $el); $test->id ('xhtml.2'); $test->assert_equals ($el->, $con); @@Test: @@@QName: AtomContentElement.container.2.test @@@enDesc: With . @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'content'); $el-> ('http://www.example.com/'); $test->id ('no'); $test->assert_null ($el->); $test->id ('application/smil'); $el-> ('application/smil'); $test->assert_null ($el->); @enImplNote: @@ddid: base64 @@@: {TODO:: Access to Base64'ed content is necessary. } ##AtomContentElement IFClsETDef: @IFQName: AtomAuthorElement @ETQName: atom|author @ETRQName: atom|author @ClsQName: ManakaiAtomAuthorElement @IFISA: AtomPersonConstruct @ClsISA: ManakaiAtomPersonConstruct @f:implements: AtomFeature10 @mv:refers: PersonAG @mv:elementContentModel: PersonCM @enDesc: The element is a Person construct that indicates the author of the entry or feed. ##AtomAuthorElement IFClsETDef: @IFQName: AtomCategoryElement @ETQName: atom|category @ETRQName: atom|category @ClsQName: ManakaiAtomCategoryElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: undefinedContent @enDesc: The element conveys information abut a category associated with an entry or feed. @Attr: @@Name: term @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'term', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'term', $given => $given, }__; @Attr: @@Name: scheme @@enDesc: The categorization scheme of the element. It attribute> of the node. @@Type: DOMString @@Type: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'scheme', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'scheme', $given => $given, }__; @Attr: @@Name: label @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'label', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'label', $given => $given, }__; ##AtomCategoryElement IFClsETDef: @IFQName: AtomContributorElement @ETQName: atom|contributor @ETRQName: atom|contributor @ClsQName: ManakaiAtomContributorElement @IFISA: AtomPersonConstruct @ClsISA: ManakaiAtomPersonConstruct @f:implements: AtomFeature10 @mv:refers: PersonAG @mv:elementContentModel: PersonCM @enDesc: The element is a Person construct that indicates a person or other entity who contributed to the entry or feed. ##AtomContributorElement IFClsETDef: @IFQName: AtomGeneratorElement @ETQName: atom|generator @ETRQName: atom|generator @ClsQName: ManakaiAtomGeneratorElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (dxm|PCDATA||ManakaiDOM|all)* @enDesc: The element identifies the agent used to generate a feed. @Attr: @@Name: uri @@enDesc: The URI attribute of the element. It attribute> of the node. @@Type: DOMString @@Type: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'uri', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'uri', $given => $given, }__; @Attr: @@Name: version @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'version', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'version', $given => $given, }__; ##AtomGeneratorElement IFClsETDef: @IFQName: AtomLinkElement @ETQName: atom|link @ETRQName: atom|link @ClsQName: ManakaiAtomLinkElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: undefinedContent @enDesc: The element defines a reference from an entry or feed to a Web resource. @ATTR: @@Name: href @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'href', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'href', $given => $given, }__; @ATTR: @@Name: rel @@enDesc: The attribute of the element. It attribute> of the node, with a few exceptions. The default value be . @@Type: DOMString @@actualType: DOMURI @@Get: @@@enDesc: If the algorithm returns a string that does not contain any character, the string be prepended for the return value of the getter. @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'rel', $r => $r, $defaultValue => {}, }__; if (defined $r and index ($r, ':') == -1) { $r = . $r; } @@Set: @@@enDesc: If the given value starts with (by simple character-by-character comparison), such substring be removed for the purpose of the setter algorithm, if and only if the result string is not empty and does contain none of , , , and . @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: if (defined $given) { $given =~ s[\Ahttp://www.iana.org/assignments/relation/([^:/?#]+)\z] [$1]; } __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'rel', $given => $given, }__; @@Test: @@@QName: AtomLinkElement.rel.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'link'); $test->id ('default'); $test->assert_equals ($el->, ); $test->id ('set'); $el-> ('http://www.example.com/'); $test->assert_equals ($el->, 'http://www.example.com/'); $test->id ('set.self'); $el-> ('self'); $test->assert_equals ($el->, ); $test->id ('set.qrelated'); $el-> (); $test->assert_equals ($el->, ); $test->id ('remove'); $el-> (null); $test->assert_equals ($el->, ); @ATTR: @@Name: type @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@enDesc: {P:: If the feature is supported, the attribute getter return the string when both of the following conditions are met: - The attribute getter would otherwise return . - The attribute contains a string value of . } @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $r => $r, $defaultValue => {null}, }__; unless (defined $r) { __DEEP{ my $rel = $self->; if (defined $rel and $rel eq ) { $r = q; } }__; } @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $given => $given, }__; @@Test: @@@QName: AtomLinkElement.type.!rel.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'link'); $test->id ('implied'); my $type0 = $el->; $test->assert_null ($type0); $test->id ('explicit'); $el-> ('application/atom+xml'); my $type1 = $el->; $test->assert_equals ($type1, q); $test->id ('different'); $el-> ('application/xhtml+xml'); my $type2 = $el->; $test->assert_equals ($type2, q); @@Test: @@@QName: AtomLinkElement.type.rel!=replies.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'link'); $el-> (); $test->id ('implied'); my $type0 = $el->; $test->assert_null ($type0); $test->id ('explicit'); $el-> ('application/atom+xml'); my $type1 = $el->; $test->assert_equals ($type1, q); $test->id ('different'); $el-> ('application/xhtml+xml'); my $type2 = $el->; $test->assert_equals ($type2, q); @@Test: @@@QName: AtomLinkElement.type.rel=replies.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc-> (, 'link'); $el-> (); $test->id ('implied'); my $type0 = $el->; $test->assert_equals ($type0, q); $test->id ('explicit'); $el-> ('application/atom+xml'); my $type1 = $el->; $test->assert_equals ($type1, q); $test->id ('different'); $el-> ('application/xhtml+xml'); my $type2 = $el->; $test->assert_equals ($type2, q); @ATTR: @@Name: hreflang @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'hreflang', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'hreflang', $given => $given, }__; @ATTR: @@Name: title @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'title', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'title', $given => $given, }__; @ATTR: @@Name: length @@enDesc: The attribute of the element. It attribute> of the node. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'length', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'length', $given => $given, }__; ##AtomLinkElement IFClsETDef: @IFQName: AtomPublishedElement @ETQName: atom|published @ETRQName: atom|published @ClsQName: ManakaiAtomPublishedElement @IFISA: AtomDateConstruct @ClsISA: ManakaiAtomDateConstruct @f:implements: AtomFeature10 @mv:refers: DateAG @mv:elementContentModel: DateCM @enDesc: The element is a Date construct indicating an instant in time associated with an event early in the life cycle of the entry. Typically, will be associated with the initial creation or first availability of the resouce. ##AtomPublishedElement IFClsETDef: @IFQName: AtomRightsElement @ETQName: atom|rights @ETRQName: atom|rights @ClsQName: ManakaiAtomRightsElement @IFISA: AtomTextConstruct @ClsISA: ManakaiAtomTextConstruct @f:implements: AtomFeature10 @mv:refers: TextAG @mv:elementContentModel: TextCM @enDesc: The element is a Text construct that conveys information about rights held in and over an entry or feed. ##AtomRightsElement ECDef: @QName: source-prop @mv:elementTypeClassName: source-prop @mv:refers: atom|author @mv:refers: atom|category @mv:refers: atom|contributor @mv:refers: atom|generator @mv:refers: atom|icon @mv:refers: atom|id @mv:refers: atom|link @mv:refers: atom|logo @mv:refers: atom|rights @mv:refers: atom|subtitle @mv:refers: atom|title @mv:refers: atom|updated @mv:refers: extensionElements IFClsETDef: @IFQName: AtomSourceElement @ETQName: atom|source @ETRQName: atom|source @ClsQName: ManakaiAtomSourceElement @IFISA: AtomElement @ClsISA: ManakaiAtomElement @f:implements: AtomFeature10 @mv:refers: atomCommonAttributes @cm: (source-prop*) @Attr: @@Name: authorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.authorElements.get @Attr: @@Name: categoryElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.categoryElements.get @Attr: @@Name: contributorElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.contributorElements.get @Attr: @@Name: generatorElement @@enDesc: The child element of the node. @@Type: AtomGeneratorElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.generatorElement.get @Attr: @@Name: icon @@enDesc: The value of the node. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.icon.get @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.icon.set @Attr: @@Name: id @@enDesc: The value of the node. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.id.get @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.id.set @Attr: @@Name: linkElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.linkElements.get @Attr: @@Name: logo @@enDesc: The value of the node. It child element> of the node. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.logo.get @@Set: @@@nullCase: @@@@enDesc: Removes the value. @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.logo.set @Attr: @@Name: rightsElement @@enDesc: The child element of the node. @@Type: AtomRightsElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.rightsElement.get @Attr: @@Name: subtitleElement @@enDesc: The child element of the node. @@Type: AtomSubtitleElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.subtitleElement.get @Attr: @@Name: titleElement @@enDesc: The child element of the node. @@Type: AtomTitleElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.titleElement.get @Attr: @@Name: updatedElement @@enDesc: The child element of the node. @@Type: AtomUpdatedElement @@Get: @@@enDesc: It child element> of the node. @@@nullCase: @@@@enDesc: If the algorithm returns . @@@NodeReadOnlyError: @@@disDef: @@@@dlp:cloneCode: ManakaiAtomFeedElement.updatedElement.get ##AtomSourceElement IFClsETDef: @IFQName: AtomSubtitleElement @ETQName: atom|subtitle @ETRQName: atom|subtitle @ClsQName: ManakaiAtomSubtitleElement @IFISA: AtomTextConstruct @ClsISA: ManakaiAtomTextConstruct @f:implements: AtomFeature10 @mv:refers: TextAG @mv:elementContentModel: TextCM @enDesc: The element is a Text construct that conveys a human-readable description or subtitle for a feed. ##AtomSubtitleElement IFClsETDef: @IFQName: AtomSummaryElement @ETQName: atom|summary @ETRQName: atom|summary @ClsQName: ManakaiAtomSummaryElement @IFISA: AtomTextConstruct @ClsISA: ManakaiAtomTextConstruct @f:implements: AtomFeature10 @mv:refers: TextAG @mv:elementContentModel: TextCM @enDesc: The element is a Text construct that conveys a short summary, abstract, or excerpt of an entry. ##AtomSummaryElement IFClsETDef: @IFQName: AtomTitleElement @ETQName: atom|title @ETRQName: atom|title @ClsQName: ManakaiAtomTitleElement @IFISA: AtomTextConstruct @ClsISA: ManakaiAtomTextConstruct @f:implements: AtomFeature10 @mv:refers: TextAG @mv:elementContentModel: TextCM @enDesc: The element is a Text construct that conveys a human-readable title for an entry or feed. ##AtomTitleElement IFClsETDef: @IFQName: AtomUpdatedElement @ETQName: atom|updated @ETRQName: atom|updated @ClsQName: ManakaiAtomUpdatedElement @IFISA: AtomDateConstruct @ClsISA: ManakaiAtomDateConstruct @f:implements: AtomFeature10 @mv:refers: DateAG @mv:elementContentModel: DateCM @enDesc: The element is a Date construct indicating the most recent instant in time when an entry or feed was modified in a way the publisher considers significant. ##AtomPublishedElement ElementTypeBinding: @Name: NodeReadOnlyError @ElementType: dx:raises @ShadowContent: @@@: MDOMX|NOMOD_THIS @@Description: @@@lang:en @@@@: If the node or a descendant of it, which is to be modified, is read-only. ## -- Configuration Parameters boolCParam: @QName: cfg|create-child-element @tc:nodeStemKey: @@@: ccldel @@ForCheck: =ManakaiDOM|all @c:targetType: tc|Document @IsSupportRequired:1 @TrueCase: @@c:isSupported:1 @@enDesc: If the parameter is set to , some DOM attributes that returns an element will create a child element when there is no element that met the condition defined for that DOM attribute. @FalseCase: @@c:isSupported:1 @@IsSupportRequired:1 @@IsDefault:1 @@enDesc: If the parameter is set to , some DOM attributes that returns an element will create a child element even when there is no element that met the condition defined for that DOM attribute. @TestC: @@QName: cfg.create-child-element.set.test @@PerlCDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $cfg = $doc->; my $cp = ; $test->id ('default'); $test->assert_false ($cfg-> ($cp)); $test->id ('set.f.to.t'); $cfg-> ($cp => true); $test->assert_true ($cfg-> ($cp)); $test->id ('set.t.to.f'); $cfg-> ($cp => false); $test->assert_false ($cfg-> ($cp)); $cfg-> ($cp => true); $test->id ('reset'); $cfg-> ($cp => null); $test->assert_false ($cfg-> ($cp)); ResourceDef: @QName: CFG @AliasFor: c|DOMConfiguration @For: ManakaiDOM|DOM3 ElementTypeBinding: @Name: boolCParam @ElementType: dis:ResourceDef @ShadowContent: @@DISCore:resourceType: @@@@: c|DOMConfigurationParameter @@@For: ManakaiDOM|DOM @@DISCore:resourceType: @@@@: DISCore|Property @@@For: =ManakaiDOM|all @@For: ManakaiDOM|DOM3 @@For: =ManakaiDOM|all @@Type: idl|boolean||ManakaiDOM|all ECDef: @QName: simpleExtensionElements @mv:elementTypeClassName: simple.extra @DISCore:resourceType: mv|ElementTypeAdditionalClass ECDef: @QName: structuredExtensionElements @mv:elementTypeClassName: structured.extra @DISCore:resourceType: mv|ElementTypeAdditionalClass EMDef: @QName: extensionElements @mv:elementTypeClassName: extra @mv:refers: simpleExtensionElements @mv:refers: structuredExtensionElements @DISCore:resourceType: mv|ElementTypeAdditionalClass AGDef: @QName: undefinedAttributes @mv:attributeTypeGroupName: common.extra ResourceDef: @QName: undefinedContent @mv:elementContentModelName: undefined @For: =ManakaiDOM|ManakaiDOMLatest @DISCore:resourceType: mv|ElementContentModel @cm: dxm|ANY||ManakaiDOM|all @enImplNote: (text | anyForeignElement)* ## -- Atom Threading Extension [RFC 4685] IFClsDef: @IFQName: AtomEntryElementThread @ClsQName: ManakaiAtomEntryElementThread @ClsISA: ManakaiAtomEntryElement @f:implements: AtomThreadingFeature10 @enDesc: If the feature is supported, any whose element type is implement the interface in addition to other appropriate interfaces. @Test: @@QName: AtomEntryElementThread.1.test @@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc->create_element_ns (, 'entry'); $test->id ('interface'); $test->assert_isa ($el, ); $test->id ('feature'); $test->assert_true ($el->is_supported ( => '1.0')); @Attr: @@Name: threadInReplyToElements @@enDesc: A static list of child elements of the node. @@Type: StaticNodeList @@Get: @@@enDesc: It child element list> of the node. @@@PerlDef: __CODE{returnChildElementList:: $node => $self, $namespaceURI => {}, $localName => 'in-reply-to', $r => $r, }__; ##AtomEntryElementThread IFClsETDef: @IFQName: AtomThreadInReplyToElement @ETQName: thr|in-reply-to @ETRQName: thr|in-reply-to @ClsQName: ManakaiAtomThreadInReplyToElement @IFISA: AtomDateConstruct @ClsISA: ManakaiAtomDateConstruct @f:implements: AtomThreadingFeature10 @mv:refers: atomCommonAttributes @cm: undefinedContent @enDesc: The element is used to indicate that an entry is a response to another resource. If the entry is a response to multiple resources, additional element be used. RFC 4685 assigns no significance to the order in which multiple element appear within an entry. @Test: @@QName: AtomThreadInReplyToElement.1.test @@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc->create_element_ns (, 'in-reply-to'); $test->id ('interface'); $test->assert_isa ($el, ); $test->id ('feature'); $test->assert_true ($el->is_supported ( => '1.0')); @ATTR: @@Name: ref @@enDesc: The attribute of the element. It attribute> of the node. The attribute specifies the persistent, universally unique identifier of the resource being responded to. The value conform to the same construction and comparison rules as the value of the element. Though the IRI might use a dereferenceable scheme, processors assume that it can be dereferenced. The element contain a attribute identifying the resource that is being respnoded to. If the resource being responded to does not have a persistent, universally unique identifier, the publisher assign an identifier that satisfies all the considerations in Section 4.2.6 of RFC 4287 for use as the value of the attribute. In that case, if a representation of the resource can be retrieved from an IRI that can be used as a valid atom:id value, then this IRI be used as the value of both the and attributes. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'ref', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'ref', $given => $given, }__; @ATTR: @@Name: source @@enDesc: The attribute of the element. It attribute> of the node. The attribute be used to specify the IRI of an Atom Feed or Entry Document containing an with an value equal to the value of the attribute. The IRI specified be dereferenceable. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'source', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'source', $given => $given, }__; @ATTR: @@Name: href @@enDesc: The attribute of the element. It attribute> of the node. The attribute specifies an IRI that may be used to retrieve a representation of the resource being responded to. The IRI specified be dereferenceable. @@Type: DOMString @@actualType: DOMURI @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'href', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrURIValue:: $node => $self, $namespaceURI => {null}, $localName => 'href', $given => $given, }__; @ATTR: @@Name: type @@enDesc: The attribute of the element. It attribute> of the node. The attribute be used to provide a hint to the client about the media type of the resource identified by the attribute. The attribute is only meaningful if a corresponding attribute is also provided. @@Type: DOMString @@Get: @@@nullCase: @@@@enDesc: If the algorithm returns . @@@PerlDef: __CODE{getReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $r => $r, $defaultValue => {null}, }__; @@Set: @@@nullCase: @@@@enDesc: Removes the attribute. @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrStringValue:: $node => $self, $namespaceURI => {null}, $localName => 'type', $given => $given, }__; ##AtomThreadInReplyToElement IFClsDef: @IFQName: AtomLinkElementThread @ClsQName: ManakaiAtomLinkElementThread @ClsISA: ManakaiAtomLinkElement @f:implements: AtomThreadingFeature10 @enDesc: An element with a attribute value of may be used to reference a resource where responses to an entry may be found. If the attribute of the is omitted, its value is assumed to be . A link appearing as a child of the or element indicates that the referenced resource likely contains responses to any of that feed's entries. A link appearing as a child of an element indicates that the linked resource likely contains responses specific to that entry. If the feature is supported, any whose element type is implement the interface in addition to other appropriate interfaces. @Test: @@QName: AtomLinkElementThread.1.test @@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $el = $doc->create_element_ns (, 'link'); $test->id ('interface'); $test->assert_isa ($el, ); $test->id ('feature'); $test->assert_true ($el->is_supported ( => '1.0')); @ATTR: @@Name: threadCount @@enDesc: The attribute of the element. It attribute> of the node. An element using the attribute value contain a attribute whose value is a non-negative integer that provides a hint to clients as to the total number of replies contained by the linked resource. The value is advisory and may not accurately reflect the actual number of replies. @@Type: idl|long||ManakaiDOM|all @@Get: @@@PerlDef: __CODE{getReflectAttrNonNegativeIntegerValue:: $node => $self, $namespaceURI => {}, $localName => 'count', $r => $r, $defaultValue => {null}, }__; @@Set: @@@NodeReadOnlyError: @@@PerlDef: __CODE{setReflectAttrNonNegativeIntegerValue:: $node => $self, $namespaceURI => {}, $localName => 'count', $given => $given, }__; @@Test: @@@QName: AtomLinkElementThread.threadCount.1.test @@@PerlDef: my $doc; __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__; my $link = $doc->create_element_ns (, 'link'); $test->id ('default'); $test->assert_num_equals (expected_value => -1, actual_value => $link->); $test->id ('zero'); $link-> (0); $test->assert_num_equals (expected_value => 0, actual_value => $link->); $test->id ('zero.attr'); $test->assert_equals ($link->get_attribute_ns (, 'count'), '0'); $test->id ('one'); $link-> (1); $test->assert_num_equals (expected_value => 1, actual_value => $link->); $test->id ('one.attr'); $test->assert_equals ($link->get_attribute_ns (, 'count'), '1'); $test->id ('10000'); $link-> (10000); $test->assert_num_equals (expected_value => 10000, actual_value => $link->); $test->id ('10000.attr'); $test->assert_equals ($link->get_attribute_ns (, 'count'), '10000'); $test->id ('+10000'); $link->set_attribute_ns (, 'thr:count', '+10000'); $test->assert_num_equals (expected_value => 10000, actual_value => $link->); $test->id ('010000'); $link->set_attribute_ns (, 'thr:count', '010000'); $test->assert_num_equals (expected_value => 10000, actual_value => $link->); $test->id ('-100'); $link-> (-100); $test->assert_num_equals (expected_value => -1, actual_value => $link->); $test->id ('-100.attr'); $test->assert_false ($link->has_attribute_ns (, 'count')); $test->id ('120a'); $link->set_attribute_ns (, 'thr:count', '120a'); $test->assert_num_equals (expected_value => -1, actual_value => $link->); $test->id ('-1'); $link-> (-1); $test->assert_num_equals (expected_value => -1, actual_value => $link->); $test->id ('-1.attr'); $test->assert_false ($link->has_attribute_ns (, 'count')); @enImplNote: @@ddid: updated @@@: {TODO:: attribute } ##AtomLinkElementThread enImplNote: @@ddid: total @@@: {TODO:: } enImplNote: @@ddid: threaddtd @@@: {TODO:: DTD impl for threading }