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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by wakaba, Thu Aug 17 12:12:02 2006 UTC revision 1.20 by wakaba, Fri Dec 29 14:45:44 2006 UTC
# Line 55  Module: Line 55  Module:
55        @@@WithFor: ManakaiDOM|ManakaiDOM        @@@WithFor: ManakaiDOM|ManakaiDOM
56      @@Module:      @@Module:
57        @@@WithFor: ManakaiDOM|ManakaiDOMLatest        @@@WithFor: ManakaiDOM|ManakaiDOMLatest
58        @@Module:
59          @@@QName: DISlib|DISMarkup
60          @@@WithFor: ManakaiDOM|all
61    @DefaultFor: ManakaiDOM|ManakaiDOMLatest    @DefaultFor: ManakaiDOM|ManakaiDOMLatest
62    
63  Namespace:  Namespace:
# Line 64  Namespace: Line 67  Namespace:
67      http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#      http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#
68    @cfg:    @cfg:
69      http://suika.fam.cx/www/2006/dom-config/      http://suika.fam.cx/www/2006/dom-config/
70      @DISlib:
71        http://suika.fam.cx/~wakaba/archive/2004/dis/
72    @dis:    @dis:
73      http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--      http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
74    @dlp:    @dlp:
75      http://suika.fam.cx/~wakaba/archive/2004/dis/Perl#      http://suika.fam.cx/~wakaba/archive/2004/dis/Perl#
   @doc:  
     http://suika.fam.cx/~wakaba/archive/2005/7/tutorial#  
76    @d:    @d:
77      http://suika.fam.cx/~wakaba/archive/2004/dom/xdt#      http://suika.fam.cx/~wakaba/archive/2004/dom/xdt#
78    @DOMMain:    @DOMMain:
79      http://suika.fam.cx/~wakaba/archive/2004/dom/main#      http://suika.fam.cx/~wakaba/archive/2004/dom/main#
80      @domperl:
81        http://suika.fam.cx/~wakaba/archive/2006/dom/perl/
82    @dx:    @dx:
83      http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#      http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#
84    @dxm:    @dxm:
# Line 88  Namespace: Line 93  Namespace:
93      http://www.w3.org/1999/xhtml      http://www.w3.org/1999/xhtml
94    @idl:    @idl:
95      http://suika.fam.cx/~wakaba/archive/2004/dis/IDL#      http://suika.fam.cx/~wakaba/archive/2004/dis/IDL#
   @infoset:  
     http://www.w3.org/2001/04/infoset#  
96    @kwd:    @kwd:
97      http://suika.fam.cx/~wakaba/archive/2005/rfc2119/      http://suika.fam.cx/~wakaba/archive/2005/rfc2119/
98    @lang:    @lang:
99      http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#      http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
100    @license:    @license:
101      http://suika.fam.cx/~wakaba/archive/2004/8/18/license#      http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
   @m12n:  
     http://suika.fam.cx/www/2006/05/m12n/  
102    @ManakaiDOM:    @ManakaiDOM:
103      http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#      http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
104    @Markup:    @Markup:
105      http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup#      http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup#
   @mat:  
     http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup/Atom/  
106    @MDOM:    @MDOM:
107      http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.      http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.
108    @MDOMX:    @MDOMX:
# Line 122  Namespace: Line 121  Namespace:
121      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/
122    @test:    @test:
123      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#
124      @thr:
125        http://purl.org/syndication/thread/1.0
126    @tx:    @tx:
127      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/
128    @urigen:    @urigen:
# Line 273  ElementTypeBinding: Line 274  ElementTypeBinding:
274        @@@@: s|ElementType        @@@@: s|ElementType
275        @@@ForCheck: s|ForML        @@@ForCheck: s|ForML
276    
     @@f:implements: AtomFeature10  
   
277  ElementTypeBinding:  ElementTypeBinding:
278    @Name: IFClsDef    @Name: IFClsDef
279    @ElementType:    @ElementType:
# Line 303  ElementTypeBinding: Line 302  ElementTypeBinding:
302        @@@ContentType: DISCore|TFPQNames        @@@ContentType: DISCore|TFPQNames
303        @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest        @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest
304    
     @@f:implements: AtomFeature10  
   
305  ElementTypeBinding:  ElementTypeBinding:
306    @Name: IFClsConstructDef    @Name: IFClsConstructDef
307    @ElementType:    @ElementType:
# Line 344  ElementTypeBinding: Line 341  ElementTypeBinding:
341        @@@@: mv|ElementContentModel        @@@@: mv|ElementContentModel
342        @@@ForCheck: mv|ForCM        @@@ForCheck: mv|ForCM
343    
     @@f:implements: AtomFeature10  
344    
345  ElementTypeBinding:  ElementTypeBinding:
346    @Name: IFQName    @Name: IFQName
# Line 571  FeatureDef: Line 567  FeatureDef:
567      @@enDesc:      @@enDesc:
568        The Atom DOM, version 1.0.        The Atom DOM, version 1.0.
569    
570    FeatureDef:
571      @featureQName: fe|AtomThreading
572      @QName: AtomThreadingFeature
573      @FeatureVerDef:
574        @@QName: AtomThreadingFeature10
575        @@Version: 1.0
576        @@f:instanceOf: AtomThreadingFeature
577        @@f:requires: fe|AtomFeature10
578        @@enDesc:
579          The Atom Threading Extension DOM, version 1.0.
580    
581  ## -- Modules  ## -- Modules
582    
583  ModuleSetDef:  ModuleSetDef:
584    @QName: Atom    @QName: Atom
   @mv:id: atom  
   @mv:vid: 10  
585    @enLN: Atom    @enLN: Atom
586    @mv:version: 1.0    @mv:version: 1.0
587    @mv:contains: AtomDatatypes    @mv:contains: AtomDatatypes
# Line 585  ModuleSetDef: Line 590  ModuleSetDef:
590    @mv:contains: AtomFeed    @mv:contains: AtomFeed
591    @mv:contains: AtomQName    @mv:contains: AtomQName
592    
593    @infoset:namespaceName:    @mv:targetNamespace: atom|
594      http://www.w3.org/2005/Atom    @mv:defaultNamespacePrefix: atom
595    @infoset:prefix: atom    @mv:systemIdentifierBaseURI: \
596    
597  ModuleDef:  ModuleDef:
598    @QName: AtomFeed    @QName: AtomFeed
# Line 667  ResourceDef: Line 672  ResourceDef:
672    @DISCore:resourceType: mv|XMLDTDQNameModule    @DISCore:resourceType: mv|XMLDTDQNameModule
673    
674    @mv:contains: Atom    @mv:contains: Atom
675    
676    ResourceDef:
677      @QName: Atom10
678      @enLN: Atom 1.0
679      @mv:id: atom10
680      @For: =ManakaiDOM|ManakaiDOMLatest
681      @DISCore:resourceType: mv|XMLDTDDriver
682    
683      @mv:refers: Atom
684    
685      @mv:refers: AtomQName
686      @mv:refers: AtomDatatypes
687      @mv:refers: AtomProperties
688      @mv:refers: AtomEntry
689      @mv:refers: AtomFeed
690    
691  ElementTypeBinding:  ElementTypeBinding:
692    @Name: ModuleSetDef    @Name: ModuleSetDef
# Line 690  IFClsDef: Line 710  IFClsDef:
710    @IFQName: AtomImplementation    @IFQName: AtomImplementation
711    @ClsQName: ManakaiAtomImplementation    @ClsQName: ManakaiAtomImplementation
712    
713    @IFISA: c|DOMImplementation    @domperl:implementedByObjectsOf: c|DOMImplementation
714    @ClsISA: c|ManakaiDOMImplementation    @domperl:classImplementedByObjectsOf: c|ManakaiDOMImplementation
715    
716    @enDesc:    @enDesc:
717      The <IF::AtomImplementation> interface provides convenience      The <IF::AtomImplementation> interface provides convenience
718      methods to create Atom documents.      methods to create Atom documents.
719    
720    @f:provides: AtomFeature10    @f:provides: AtomFeature10
721      @f:implements: AtomFeature10
722    
723    @Test:    @Test:
724      @@QName: AtomImplementation.interface.test      @@QName: AtomImplementation.interface.test
# Line 706  IFClsDef: Line 727  IFClsDef:
727          <IFName::AtomImplementation>,          <IFName::AtomImplementation>,
728          <IFName::AtomImplementation||ManakaiDOM|ManakaiDOM>,          <IFName::AtomImplementation||ManakaiDOM|ManakaiDOM>,
729          <IFName::c|DOMImplementation>,          <IFName::c|DOMImplementation>,
         <IFName::urigen|URIImplementation>,  
         <IFName::f|MinimumImplementation>,  
730          <IFName::f|GetFeature>,          <IFName::f|GetFeature>,
731        ) {        ) {
732          $test->id ($interface);          $test->id ($interface);
733          $test->assert_true          $test->assert_true
734                   (<Class::ManakaiAtomImplementation>->isa ($interface));                   (<Class::c|ManakaiDOMImplementation>->isa ($interface));
735        }        }
736    @Test:    @Test:
737      @@QName: ImplementationRegistry.AtomImplementation.1.test      @@QName: ImplementationRegistry.AtomImplementation.1.test
738      @@PerlDef:      @@PerlDef:
739        require Message::Markup::Atom;        require Message::Markup::Atom;
740        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
741                     ->get_implementation ({                     ->get_dom_implementation ({
742                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
743                       });                       });
744    
# Line 729  IFClsDef: Line 748  IFClsDef:
748      @@PerlDef:      @@PerlDef:
749        require Message::Markup::Atom;        require Message::Markup::Atom;
750        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
751                     ->get_implementation ({                     ->get_dom_implementation ({
752                         Core => '3.0',                         Core => '3.0',
753                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
754                       });                       });
# Line 740  IFClsDef: Line 759  IFClsDef:
759      @@PerlDef:      @@PerlDef:
760        require Message::Markup::Atom;        require Message::Markup::Atom;
761        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
762                     ->get_implementation ({                     ->get_dom_implementation ({
763                         XML => '3.0',                         XML => '3.0',
764                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
765                       });                       });
# Line 776  IFClsDef: Line 795  IFClsDef:
795            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
796            as if an empty string is specified.            as if an empty string is specified.
797      @@Return:      @@Return:
798        @@@Type: AtomFeedDocument        @@@Type: AtomDocument
799        @@@enDesc:        @@@enDesc:
800          The newly created Atom Feed Document.          The newly created Atom Feed Document.
801    
# Line 959  IFClsDef: Line 978  IFClsDef:
978            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
979            as if an empty string is specified.            as if an empty string is specified.
980      @@Return:      @@Return:
981        @@@Type: AtomEntryDocument        @@@Type: AtomDocument
982        @@@enDesc:        @@@enDesc:
983          The newly created Atom Entry Document.          The newly created Atom Entry Document.
984    
# Line 1502  IFClsDef: Line 1521  IFClsDef:
1521          <QUOTE::reflecting Date child element> attribute should          <QUOTE::reflecting Date child element> attribute should
1522          be provided for published and created?          be provided for published and created?
1523        }        }
 ##AtomImplementation  
1524    
1525  IFClsDef:    @CODE:
1526    @IFQName: AtomDocument      @@QName: getReflectAttrNonNegativeIntegerValue
1527    @ClsQName: ManakaiAtomDocument      @@enDesc:
1528          {P:: If a DOM attribute is defined to <DFN::reflect the
1529               non-negative integer value of the <VAR::attr-name> attribute>
1530               of the node <VAR::E>, the getter of the attribute <kwd:MUST>
1531               return the value defined by the algorithm:
1532    
1533            {OLI:: If the <VAR::E> contains an attribute node <VAR::A> whose name
1534                   is <VAR::attr-name>:
1535    
1536              = If the <A::Node.nodeValue> of the <VAR::A> is
1537                one or more sequence of digits (<CHAR::DIGIT ZERO>,
1538                <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>) optionally
1539                preceding by a <CHAR::PLUS SIGN>, then
1540                the attribute getter <kwd:MUST> return a value
1541                by interpreting the <A::Node.nodeValue> of the <VAR::A>
1542                as a decimal number.
1543    
1544    @IFISA: Document          }
   @ClsISA: td|ManakaiDOMDocument  
1545    
1546    @s:rootElementType: AnyAtomElement||ManakaiDOM|all          = If a default value is explicitly defined
1547              where this algorithm is referenced, it <kwd:MUST>
1548              return the default value.
1549    
1550    @enDesc:          = Otherwise, it <kwd:MUST> return a binding-specific
1551      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>            default value, if it is defined by the specification
1552      is supported, a <IF::Document> object whose <A::Document.documentElement>'s            of the binding, or <DOM::-1>.
     <A::Node.namespaceURI>, if any, is <URI^^DISCore|QName::atom|> at least  
     at the time of creation <kwd:MUST> also  
     implement the <IF::AtomDocument> interface.  Other  
     <IF:Document> objects <kwd:MAY> also implement  
     the <IF::AtomDocument> interface.  
1553    
1554    @Test:        }
     @@QName: createDocument.AtomDocument.test  
     @@PerlDef:  
       my $impl;  
       __CODE{tc|createImplForTest:: $impl => $impl}__;  
       
       my $doc = $impl-><M::c|DOMImplementation.createDocument>  
                          (<Q::atom|>, 'unknown');  
1555    
1556        $test->id ('interface');          {NOTE::
1557        $test->assert_isa ($doc, <IFName::AtomDocument>);            In Atom Threading Extension <SRC::RFC 4685>,
1558  ##AtomDocument            the <CHAR::PLUS SIGN> and leading <CHAR::DIGIT ZERO>s
1559              are prohibitted.
1560            }
1561        @@PerlDef:
1562          __DEEP{
1563            E: {
1564              $r = $node-><M::Element.getAttributeNS> ($namespaceURI, $localName);
1565              if (defined $r) {
1566                if ($r =~ /\A\+?([0-9]+)\z/) {
1567                  $r = 0+$1;
1568                  last E;
1569                }
1570              }
1571    
1572  IFClsDef:            $r = $defaultValue;
1573    @IFQName: AtomFeedDocument            $r = -1 unless defined $r;
1574    @ClsQName: ManakaiFeedEntryDocument          } # E
1575          }__;
1576    
1577    @IFISA: AtomDocument    @CODE:
1578    @ClsISA: ManakaiAtomDocument      @@QName: setReflectAttrNonNegativeIntegerValue
1579        @@enDesc:
1580          {P:: If a DOM attribute is defined to <DFN::reflect the
1581               non-negative integer value
1582               of the <VAR::attr-name> attribute> of the node <VAR::E>,
1583               the setter of the attribute <kwd:MUST> modify the node as
1584               defined by the algorithm:
1585    
1586    @s:rootElementType:          = If the given value is <DOM::-1> or one of binding-specific
1587      @@@: atom|feed            default values, if any, as defined by the specification
1588      @@DISCore:stopISARecursive: 1            of the binding, it <kwd:MUST>
1589              remove the <VAR::attr-name> attribute node, if any,
1590              from the list of attribute nodes of <VAR::E>.
1591    
1592    @enDesc:          = Otherwise, it <kwd:MUST> set the <VAR::attr-name>
1593      The <IF::AtomFeedDocument> interface provides convenience            attribute node value to a string representation
1594      methods and attributes for an Atom            of the given value as if
1595      Feed Document, i.e. representation of an Atom feed.            the <M::Element.setAttributeNS> method were invoked.
1596              The string representation <kwd:MUST> be a decimal
1597              number consist of one or more sequence of digits
1598              (<CHAR::DIGIT ZERO>, <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>)
1599              <EM::without> any leading <CHAR::DIGIT ZERO>.
1600              The <CHAR::PLUS SIGN> <kwd:MUST> be omitted.
1601    
1602      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>        }
     is supported, a <IF::Document> object whose <A::Document.documentElement>'s  
     element type, if any, is <XE::atom|feed> at least at  
     the time of creation <kwd:MUST> also  
     implement the <IF::AtomFeedDocument> interface.  Other  
     <IF::Document> objects <kwd:MAY> also implement  
     the <IF::AtomFeedDocument> interface.  
1603    
1604    @Test:          {NOTE::
1605      @@QName: createDocument.AtomFeedDocument.test            It might throw an exception.
1606            }
1607      @@PerlDef:      @@PerlDef:
1608        my $impl;        __DEEP{
1609        __CODE{tc|createImplForTest:: $impl => $impl}__;          if (defined $given and $given >= 0) {
1610                  $node-><M::Element.setAttributeNS>
1611        my $doc = $impl-><M::c|DOMImplementation.createDocument>                     ($namespaceURI, $localName, 0+$given);
1612                           (<Q::atom|>, 'feed');          } else {
1613              $node-><M::Element.removeAttributeNS> ($namespaceURI, $localName);
1614        $test->id ('interface');          }
1615        $test->assert_isa ($doc, <IFName::AtomFeedDocument>);        }__;
1616  ##AtomFeedDocument  ##AtomImplementation
1617    
1618  IFClsDef:  IFClsDef:
1619    @IFQName: AtomEntryDocument    @IFQName: AtomDocument
1620    @ClsQName: ManakaiAtomEntryDocument    @ClsQName: ManakaiAtomDocument
1621    
1622    @IFISA: AtomDocument    @domperl:implementedByObjectsOf: Document
1623    @ClsISA: ManakaiAtomDocument    @domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument
1624    
1625    @s:rootElementType:    @f:implements: AtomFeature10
     @@@: atom|entry  
     @@DISCore:stopISARecursive: 1  
1626    
1627    @enDesc:    @enDesc:
     The <IF::AtomEntryDocument> interface provides convenience  
     methods and attributes for an Atom  
     Entry Document, i.e. exactly one Atom entry, outside  
     of the context of an Atom feed.  
   
1628      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>
1629      is supported, a <IF::Document> object whose <A::Document.documentElement>'s      is supported, a <IF::Document> object whose <A::Document.documentElement>'s
1630      element type, if any, is <XE::atom|entry> at least at      <A::Node.namespaceURI>, if any, is <URI^^DISCore|QName::atom|> at least
1631      the time of the creation <kwd:MUST> also      at the time of creation <kwd:MUST> also
1632      implement the <IF::AtomEntryDocument> interface.  Other      implement the <IF::AtomDocument> interface.  Other
1633      <IF::Document> objects <kwd:MAY> also implement      <IF:Document> objects <kwd:MAY> also implement
1634      the <IF::AtomEntryDocument> interface.      the <IF::AtomDocument> interface.
1635    
1636    @Test:    @Test:
1637      @@QName: createDocument.AtomEntryDocument.test      @@QName: createDocument.AtomDocument.test
1638      @@PerlDef:      @@PerlDef:
1639        my $impl;        my $impl;
1640        __CODE{tc|createImplForTest:: $impl => $impl}__;        __CODE{tc|createImplForTest:: $impl => $impl}__;
1641            
1642        my $doc = $impl-><M::c|DOMImplementation.createDocument>        my $doc = $impl-><M::c|DOMImplementation.createDocument>
1643                           (<Q::atom|>, 'entry');                           (<Q::atom|>, 'unknown');
1644    
1645        $test->id ('interface');        $test->id ('interface');
1646        $test->assert_isa ($doc, <IFName::AtomEntryDocument>);        $test->assert_isa ($doc, <IFName::AtomDocument>);
1647  ##AtomEntryDocument  ##AtomDocument
1648    
1649  AGDef:  AGDef:
1650    @QName: atomCommonAttributes    @QName: atomCommonAttributes
1651    @enFN: common attributes    @enFN: common attributes
1652    @mv:attributeTypeGroupName: common    @mv:attributeTypeGroupName: common
1653    
1654      @mv:refers: Atom
1655        
1656    @ATDef:    @ATDef:
1657      @@mv:attributeTypeName: xml|base      @@mv:attributeTypeName: xml|base
# Line 1718  IFClsDef: Line 1756  IFClsDef:
1756    @IFISA: Element    @IFISA: Element
1757    @ClsISA: te|ManakaiDOMElement    @ClsISA: te|ManakaiDOMElement
1758        
1759      @f:implements: AtomFeature10
1760    @s:elementType: AnyAtomElement||ManakaiDOM|all    @s:elementType: AnyAtomElement||ManakaiDOM|all
1761    
1762    @enDesc:    @enDesc:
# Line 1787  IFClsConstructDef: Line 1826  IFClsConstructDef:
1826    @IFISA: AtomElement    @IFISA: AtomElement
1827    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1828    
1829      @f:implements: AtomFeature10
1830    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1831    
1832    @cm:    @cm:
# Line 1928  IFClsConstructDef: Line 1968  IFClsConstructDef:
1968    @IFISA: AtomElement    @IFISA: AtomElement
1969    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1970    
1971      @f:implements: AtomFeature10
1972    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1973    
1974    @cm:    @cm:
# Line 2084  IFClsConstructDef: Line 2125  IFClsConstructDef:
2125    @IFISA: AtomElement    @IFISA: AtomElement
2126    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2127    
2128      @f:implements: AtomFeature10
2129    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2130    
2131    @cm:    @cm:
# Line 2191  IFClsETDef: Line 2233  IFClsETDef:
2233    @IFISA: AtomElement    @IFISA: AtomElement
2234    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2235    
2236      @f:implements: AtomFeature10
2237    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2238    
2239    @cm:    @cm:
# Line 2799  IFClsETDef: Line 2842  IFClsETDef:
2842                                  (<Q::atom|>, 'updated');                                  (<Q::atom|>, 'updated');
2843            $updatede-><AS::AtomDateConstruct.value> (scalar time);            $updatede-><AS::AtomDateConstruct.value> (scalar time);
2844            $r-><M::Node.appendChild> ($updatede);            $r-><M::Node.appendChild> ($updatede);
2845    
2846              $self-><M::Node.appendChild> ($r);
2847          }__;          }__;
2848    
2849      @@Test:      @@Test:
# Line 2865  IFClsETDef: Line 2910  IFClsETDef:
2910          $test->assert_num_not_equals          $test->assert_num_not_equals
2911                   (actual_value => $updated-><AG::AtomDateConstruct.value>,                   (actual_value => $updated-><AG::AtomDateConstruct.value>,
2912                    expected_value => 0);                    expected_value => 0);
2913    
2914            $test->id ('parent');
2915            $test->assert_equals ($ent-><AG::Node.parentNode>, $feed);
2916      @@Test:      @@Test:
2917        @@@QName: AtomFeedElement.addNewEntry.2.test        @@@QName: AtomFeedElement.addNewEntry.2.test
2918        @@@enDesc:        @@@enDesc:
# Line 2909  IFClsETDef: Line 2957  IFClsETDef:
2957    @IFISA: AtomElement    @IFISA: AtomElement
2958    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2959    
2960      @f:implements: AtomFeature10
2961    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2962    
2963    @cm:    @cm:
# Line 3086  IFClsETDef: Line 3135  IFClsETDef:
3135          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);
3136    
3137          $test->id ('parent');          $test->id ('parent');
3138            my $parent;
3139          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3140              $parent = $_;
3141            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3142                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3143            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3106  IFClsETDef: Line 3157  IFClsETDef:
3157          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');
3158    
3159          $test->id ('parent');          $test->id ('parent');
3160            my $parent;
3161          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3162              $parent = $_;
3163            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3164                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3165            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3442  IFClsETDef: Line 3495  IFClsETDef:
3495    @IFISA: AtomElement    @IFISA: AtomElement
3496    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3497    
3498      @f:implements: AtomFeature10
3499    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3500        
3501    @cm: atomUriCM    @cm: atomUriCM
# Line 3456  IFClsETDef: Line 3510  IFClsETDef:
3510    @IFISA: AtomElement    @IFISA: AtomElement
3511    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3512    
3513      @f:implements: AtomFeature10
3514    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3515    
3516    @cm: atomUriCM    @cm: atomUriCM
# Line 3470  IFClsETDef: Line 3525  IFClsETDef:
3525    @IFISA: AtomElement    @IFISA: AtomElement
3526    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3527    
3528      @f:implements: AtomFeature10
3529    # no common attribs    # no common attribs
3530    @cm: TextCM    @cm: TextCM
3531    
3532      @mv:refers: Atom
3533  ##AtomNameElement  ##AtomNameElement
3534    
3535  IFClsETDef:  IFClsETDef:
# Line 3483  IFClsETDef: Line 3541  IFClsETDef:
3541    @IFISA: AtomElement    @IFISA: AtomElement
3542    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3543    
3544      @f:implements: AtomFeature10
3545    # no common attribs    # no common attribs
3546    @cm: atomUriCM    @cm: atomUriCM
3547    
3548      @mv:refers: Atom
3549  ##AtomUriElement  ##AtomUriElement
3550    
3551  IFClsETDef:  IFClsETDef:
# Line 3496  IFClsETDef: Line 3557  IFClsETDef:
3557    @IFISA: AtomElement    @IFISA: AtomElement
3558    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3559    
3560      @f:implements: AtomFeature10
3561    # no common attribs    # no common attribs
3562    @cm: atomEmailAddressCM    @cm: atomEmailAddressCM
3563    
3564      @mv:refers: Atom
3565  ##AtomEmailElement  ##AtomEmailElement
3566    
3567  IFClsETDef:  IFClsETDef:
# Line 3509  IFClsETDef: Line 3573  IFClsETDef:
3573    @IFISA: AtomElement    @IFISA: AtomElement
3574    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3575    
3576      @f:implements: AtomFeature10
3577    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3578    
3579    @cm: atomUriCM    @cm: atomUriCM
# Line 3523  IFClsETDef: Line 3588  IFClsETDef:
3588    @IFISA: AtomElement    @IFISA: AtomElement
3589    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3590    
3591      @f:implements: AtomFeature10
3592    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3593    
3594    @cm:    @cm:
# Line 3532  IFClsETDef: Line 3598  IFClsETDef:
3598      The <XE::atom|content> element either contains or links to      The <XE::atom|content> element either contains or links to
3599      the content of the entry.      the content of the entry.
3600    
3601    @Attr:    @ATTR:
3602      @@Name: type      @@Name: type
3603      @@enDesc:      @@enDesc:
3604        The type of the element.        The type of the element.
# Line 3597  IFClsETDef: Line 3663  IFClsETDef:
3663          $el-><AS::AtomContentElement.type> (null);          $el-><AS::AtomContentElement.type> (null);
3664          $test->assert_null ($el-><AG::AtomContentElement.type>);          $test->assert_null ($el-><AG::AtomContentElement.type>);
3665    
3666    @Attr:    @ATTR:
3667      @@Name: src      @@Name: src
3668      @@enDesc:      @@enDesc:
3669        The source of the remote content of the element.        The source of the remote content of the element.
# Line 3776  IFClsETDef: Line 3842  IFClsETDef:
3842    
3843    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3844    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3845    
3846      @f:implements: AtomFeature10
3847    @mv:refers: PersonAG    @mv:refers: PersonAG
3848    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3849    
# Line 3793  IFClsETDef: Line 3861  IFClsETDef:
3861    @IFISA: AtomElement    @IFISA: AtomElement
3862    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3863    
3864      @f:implements: AtomFeature10
3865    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3866    
3867    @cm: undefinedContent    @cm: undefinedContent
# Line 3910  IFClsETDef: Line 3979  IFClsETDef:
3979    
3980    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3981    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3982    
3983      @f:implements: AtomFeature10
3984    @mv:refers: PersonAG    @mv:refers: PersonAG
3985    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3986    
# Line 3928  IFClsETDef: Line 3999  IFClsETDef:
3999    @IFISA: AtomElement    @IFISA: AtomElement
4000    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4001    
4002      @f:implements: AtomFeature10
4003    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4004    
4005    @cm:    @cm:
# Line 4014  IFClsETDef: Line 4086  IFClsETDef:
4086    @IFISA: AtomElement    @IFISA: AtomElement
4087    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4088    
4089      @f:implements: AtomFeature10
4090    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4091    
4092    @cm: undefinedContent    @cm: undefinedContent
# Line 4149  IFClsETDef: Line 4222  IFClsETDef:
4222        of the <XA::type> attribute> of the node.        of the <XA::type> attribute> of the node.
4223      @@Type: DOMString      @@Type: DOMString
4224      @@Get:      @@Get:
4225          @@@enDesc:
4226            {P:: If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4227                 is supported, the attribute getter <kwd:MUST> return
4228                 the string <CODE::application/atom+xml> when both of the
4229                 following conditions are met:
4230    
4231               - The attribute getter would otherwise return <DOM::null>.
4232    
4233               - The <A::AtomLinkElement.rel> attribute contains
4234                 a string value of <URI^^DISCore|QName::rel|replies>.
4235    
4236            }
4237        @@@nullCase:        @@@nullCase:
4238          @@@@enDesc:          @@@@enDesc:
4239            If the algorithm returns <DOM::null>.            If the algorithm returns <DOM::null>.
# Line 4160  IFClsETDef: Line 4245  IFClsETDef:
4245            $r => $r,            $r => $r,
4246            $defaultValue => {null},            $defaultValue => {null},
4247          }__;          }__;
4248    
4249            unless (defined $r) {
4250              __DEEP{
4251                my $rel = $self-><AG::AtomLinkElement.rel>;
4252                if (defined $rel and $rel eq <Q::rel|replies>) {
4253                  $r = q<application/atom+xml>;
4254                }
4255              }__;
4256            }
4257      @@Set:      @@Set:
4258        @@@nullCase:        @@@nullCase:
4259          @@@@enDesc:          @@@@enDesc:
# Line 4173  IFClsETDef: Line 4267  IFClsETDef:
4267            $given => $given,            $given => $given,
4268          }__;          }__;
4269    
4270        @@Test:
4271          @@@QName: AtomLinkElement.type.!rel.test
4272          @@@PerlDef:
4273            my $doc;
4274            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4275    
4276            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4277    
4278            $test->id ('implied');
4279            my $type0 = $el-><AG::AtomLinkElement.type>;
4280            $test->assert_null ($type0);
4281    
4282            $test->id ('explicit');
4283            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4284            my $type1 = $el-><AG::AtomLinkElement.type>;
4285            $test->assert_equals ($type1, q<application/atom+xml>);
4286    
4287            $test->id ('different');
4288            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4289            my $type2 = $el-><AG::AtomLinkElement.type>;
4290            $test->assert_equals ($type2, q<application/xhtml+xml>);
4291        @@Test:
4292          @@@QName: AtomLinkElement.type.rel!=replies.test
4293          @@@PerlDef:
4294            my $doc;
4295            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4296    
4297            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4298    
4299            $el-><AS::AtomLinkElement.rel> (<Q::rel|alternate>);
4300    
4301            $test->id ('implied');
4302            my $type0 = $el-><AG::AtomLinkElement.type>;
4303            $test->assert_null ($type0);
4304    
4305            $test->id ('explicit');
4306            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4307            my $type1 = $el-><AG::AtomLinkElement.type>;
4308            $test->assert_equals ($type1, q<application/atom+xml>);
4309    
4310            $test->id ('different');
4311            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4312            my $type2 = $el-><AG::AtomLinkElement.type>;
4313            $test->assert_equals ($type2, q<application/xhtml+xml>);
4314        @@Test:
4315          @@@QName: AtomLinkElement.type.rel=replies.test
4316          @@@PerlDef:
4317            my $doc;
4318            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4319    
4320            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4321    
4322            $el-><AS::AtomLinkElement.rel> (<Q::rel|replies>);
4323    
4324            $test->id ('implied');
4325            my $type0 = $el-><AG::AtomLinkElement.type>;
4326            $test->assert_equals ($type0, q<application/atom+xml>);
4327    
4328            $test->id ('explicit');
4329            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4330            my $type1 = $el-><AG::AtomLinkElement.type>;
4331            $test->assert_equals ($type1, q<application/atom+xml>);
4332    
4333            $test->id ('different');
4334            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4335            my $type2 = $el-><AG::AtomLinkElement.type>;
4336            $test->assert_equals ($type2, q<application/xhtml+xml>);
4337    
4338    @ATTR:    @ATTR:
4339      @@Name: hreflang      @@Name: hreflang
4340      @@enDesc:      @@enDesc:
# Line 4281  IFClsETDef: Line 4443  IFClsETDef:
4443    
4444    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4445    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4446    
4447      @f:implements: AtomFeature10
4448    @mv:refers: DateAG    @mv:refers: DateAG
4449    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4450    
# Line 4301  IFClsETDef: Line 4465  IFClsETDef:
4465    
4466    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4467    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4468    
4469      @f:implements: AtomFeature10
4470    @mv:refers: TextAG    @mv:refers: TextAG
4471    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4472    
# Line 4336  IFClsETDef: Line 4502  IFClsETDef:
4502    @IFISA: AtomElement    @IFISA: AtomElement
4503    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4504    
4505      @f:implements: AtomFeature10
4506    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4507    
4508    @cm:    @cm:
# Line 4550  IFClsETDef: Line 4717  IFClsETDef:
4717    
4718    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4719    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4720    
4721      @f:implements: AtomFeature10
4722    @mv:refers: TextAG    @mv:refers: TextAG
4723    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4724    
# Line 4566  IFClsETDef: Line 4735  IFClsETDef:
4735    
4736    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4737    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4738    
4739      @f:implements: AtomFeature10
4740    @mv:refers: TextAG    @mv:refers: TextAG
4741    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4742    
# Line 4582  IFClsETDef: Line 4753  IFClsETDef:
4753    
4754    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4755    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4756    
4757      @f:implements: AtomFeature10
4758    @mv:refers: TextAG    @mv:refers: TextAG
4759    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4760    
# Line 4598  IFClsETDef: Line 4771  IFClsETDef:
4771    
4772    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4773    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4774    
4775      @f:implements: AtomFeature10
4776    @mv:refers: DateAG    @mv:refers: DateAG
4777    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4778    
# Line 4720  ResourceDef: Line 4895  ResourceDef:
4895    @cm: dxm|ANY||ManakaiDOM|all    @cm: dxm|ANY||ManakaiDOM|all
4896    @enImplNote:    @enImplNote:
4897      (text | anyForeignElement)*      (text | anyForeignElement)*
4898    
4899    ## -- Atom Threading Extension [RFC 4685]
4900    
4901    IFClsDef:
4902      @IFQName: AtomEntryElementThread
4903      @ClsQName: ManakaiAtomEntryElementThread
4904    
4905      @ClsISA: ManakaiAtomEntryElement
4906    
4907      @f:implements: AtomThreadingFeature10
4908    
4909      @enDesc:
4910        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4911        is supported, any <IF::Element> whose element type
4912        is <XE::atom|entry> <kwd:MUST> implement the <IF::AtomEntryElementThread>
4913        interface in addition to other appropriate interfaces.
4914    
4915      @Test:
4916        @@QName: AtomEntryElementThread.1.test
4917        @@PerlDef:
4918          my $doc;
4919          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4920    
4921          my $el = $doc->create_element_ns (<Q::atom|>, 'entry');
4922    
4923          $test->id ('interface');
4924          $test->assert_isa ($el, <IFName::AtomEntryElementThread>);
4925    
4926          $test->id ('feature');
4927          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4928    
4929      @Attr:
4930        @@Name: threadInReplyToElements
4931        @@enDesc:
4932          A static list of <XE::thr|in-reply-to> child elements of the node.
4933        @@Type: StaticNodeList
4934        @@Get:
4935          @@@enDesc:
4936            It <kwd:MUST> <I::return a <XE::thr|in-reply-to> child element list>
4937            of the node.
4938          @@@PerlDef:
4939            __CODE{returnChildElementList::
4940              $node => $self,
4941              $namespaceURI => {<Q::thr|>},
4942              $localName => 'in-reply-to',
4943              $r => $r,
4944            }__;
4945    ##AtomEntryElementThread
4946    
4947    IFClsETDef:
4948      @IFQName: AtomThreadInReplyToElement
4949      @ETQName: thr|in-reply-to
4950      @ETRQName: thr|in-reply-to
4951      @ClsQName: ManakaiAtomThreadInReplyToElement
4952    
4953      @IFISA: AtomDateConstruct
4954      @ClsISA: ManakaiAtomDateConstruct
4955    
4956      @f:implements: AtomThreadingFeature10
4957      @mv:refers: atomCommonAttributes
4958    
4959      @cm: undefinedContent
4960    
4961      @enDesc:
4962        The <XE::thr|in-reply-to> element is used to indicate
4963        that an entry is a response to another resource.
4964    
4965        If the entry is a response to multiple resources,
4966        additional <XE::thr|in-reply-to> element <kwd:MAY>
4967        be used.
4968    
4969        RFC 4685 assigns no significance to the order in which
4970        multiple <XE::thr|in-reply-to> element appear within
4971        an entry.
4972    
4973      @Test:
4974        @@QName: AtomThreadInReplyToElement.1.test
4975        @@PerlDef:
4976          my $doc;
4977          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4978    
4979          my $el = $doc->create_element_ns (<Q::thr|>, 'in-reply-to');
4980    
4981          $test->id ('interface');
4982          $test->assert_isa ($el, <IFName::AtomThreadInReplyToElement>);
4983    
4984          $test->id ('feature');
4985          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4986    
4987      @ATTR:
4988        @@Name: ref
4989        @@enDesc:
4990          The <XA::ref> attribute of the element.
4991    
4992          It <kwd:MUST> <I::reflect the URI value
4993          of the <XA::ref> attribute> of the node.
4994    
4995          The <XA::ref> attribute specifies the persistent,
4996          universally unique identifier of the resource being
4997          responded to.  The value <kwd:MUST> conform to
4998          the same construction and comparison rules as the
4999          value of the <XE::atom|id> element.  Though the IRI
5000          might use a dereferenceable scheme, processors <kwd:MUST-NOT>
5001          assume that it can be dereferenced.
5002    
5003          The <XE::thr|in-reply-to> element <kwd:MUST> contain
5004          a <XA::ref> attribute identifying the resource that
5005          is being respnoded to.
5006    
5007          If the resource being responded to does not have a persistent,
5008          universally unique identifier, the publisher <kwd:MUST> assign an
5009          identifier that satisfies all the considerations in Section 4.2.6 of
5010          RFC 4287 for use as the value of the <XA::ref> attribute.
5011          In that case, if a representation of the resource can be retrieved
5012          from an IRI that can be used as a valid atom:id value, then this IRI
5013          <kwd:SHOULD> be used as the value of both the <XA::ref> and
5014          <XA::href> attributes.
5015        @@Type: DOMString
5016        @@actualType: DOMURI
5017        @@Get:
5018          @@@nullCase:
5019            @@@@enDesc:
5020              If the algorithm returns <DOM::null>.
5021          @@@PerlDef:
5022            __CODE{getReflectAttrURIValue::
5023              $node => $self,
5024              $namespaceURI => {null},
5025              $localName => 'ref',
5026              $r => $r,
5027              $defaultValue => {null},
5028            }__;
5029        @@Set:
5030          @@@nullCase:
5031            @@@@enDesc:
5032              Removes the attribute.
5033          @@@NodeReadOnlyError:
5034          @@@PerlDef:
5035            __CODE{setReflectAttrURIValue::
5036              $node => $self,
5037              $namespaceURI => {null},
5038              $localName => 'ref',
5039              $given => $given,
5040            }__;
5041            
5042      @ATTR:
5043        @@Name: source
5044        @@enDesc:
5045          The <XA::source> attribute of the element.
5046    
5047          It <kwd:MUST> <I::reflect the URI value
5048          of the <XA::source> attribute> of the node.
5049    
5050          The <XA::source> attribute <kwd:MAY> be used to specify the IRI
5051          of an Atom Feed or Entry Document containing an
5052          <XE::atom|entry> with an <XE::atom|id> value equal to the
5053          value of the <XA::ref> attribute.  The IRI specified <kwd:MUST>
5054          be dereferenceable.
5055        @@Type: DOMString
5056        @@actualType: DOMURI
5057        @@Get:
5058          @@@nullCase:
5059            @@@@enDesc:
5060              If the algorithm returns <DOM::null>.
5061          @@@PerlDef:
5062            __CODE{getReflectAttrURIValue::
5063              $node => $self,
5064              $namespaceURI => {null},
5065              $localName => 'source',
5066              $r => $r,
5067              $defaultValue => {null},
5068            }__;
5069        @@Set:
5070          @@@nullCase:
5071            @@@@enDesc:
5072              Removes the attribute.
5073          @@@NodeReadOnlyError:
5074          @@@PerlDef:
5075            __CODE{setReflectAttrURIValue::
5076              $node => $self,
5077              $namespaceURI => {null},
5078              $localName => 'source',
5079              $given => $given,
5080            }__;
5081            
5082      @ATTR:
5083        @@Name: href
5084        @@enDesc:
5085          The <XA::href> attribute of the element.
5086    
5087          It <kwd:MUST> <I::reflect the URI value
5088          of the <XA::href> attribute> of the node.
5089    
5090          The <XA::href> attribute specifies an IRI that may be used
5091          to retrieve a representation of the resource being
5092          responded to.  The IRI specified <kwd:MUST> be
5093          dereferenceable.
5094        @@Type: DOMString
5095        @@actualType: DOMURI
5096        @@Get:
5097          @@@nullCase:
5098            @@@@enDesc:
5099              If the algorithm returns <DOM::null>.
5100          @@@PerlDef:
5101            __CODE{getReflectAttrURIValue::
5102              $node => $self,
5103              $namespaceURI => {null},
5104              $localName => 'href',
5105              $r => $r,
5106              $defaultValue => {null},
5107            }__;
5108        @@Set:
5109          @@@nullCase:
5110            @@@@enDesc:
5111              Removes the attribute.
5112          @@@NodeReadOnlyError:
5113          @@@PerlDef:
5114            __CODE{setReflectAttrURIValue::
5115              $node => $self,
5116              $namespaceURI => {null},
5117              $localName => 'href',
5118              $given => $given,
5119            }__;
5120      
5121      @ATTR:
5122        @@Name: type
5123        @@enDesc:
5124          The <XA::type> attribute of the element.
5125    
5126          It <kwd:MUST> <I::reflect the string value
5127          of the <XA::type> attribute> of the node.
5128    
5129          The <XA::type> attribute <kwd:MAY> be used to provide
5130          a hint to the client about the media type of the
5131          resource identified by the <XA::href> attribute.
5132          The <XA::type> attribute is only meaningful if a
5133          corresponding <XA::href> attribute is also provided.
5134        @@Type: DOMString
5135        @@Get:
5136          @@@nullCase:
5137            @@@@enDesc:
5138              If the algorithm returns <DOM::null>.
5139          @@@PerlDef:
5140            __CODE{getReflectAttrStringValue::
5141              $node => $self,
5142              $namespaceURI => {null},
5143              $localName => 'type',
5144              $r => $r,
5145              $defaultValue => {null},
5146            }__;
5147        @@Set:
5148          @@@nullCase:
5149            @@@@enDesc:
5150              Removes the attribute.
5151          @@@NodeReadOnlyError:
5152          @@@PerlDef:
5153            __CODE{setReflectAttrStringValue::
5154              $node => $self,
5155              $namespaceURI => {null},
5156              $localName => 'type',
5157              $given => $given,
5158            }__;
5159    ##AtomThreadInReplyToElement
5160    
5161    IFClsDef:
5162      @IFQName: AtomLinkElementThread
5163      @ClsQName: ManakaiAtomLinkElementThread
5164    
5165      @ClsISA: ManakaiAtomLinkElement
5166    
5167      @f:implements: AtomThreadingFeature10
5168    
5169      @enDesc:
5170        An <XE::atom|link> element with a <XA::rel> attribute value of
5171        <XML::replies> may be used to reference a resource where responses
5172        to an entry may be found.  If the <XA::type> attribute of the
5173        <XE::atom|link> is omitted, its value is assumed to be
5174        <XML::application/atom+xml>.
5175    
5176        A <XML::replies> link appearing as a child of the <XE::atom|feed>
5177        or <XE::atom|source> element indicates that the referenced
5178        resource likely contains responses to any of that
5179        feed's entries.  A <XML::replies>
5180        link appearing as a child of an <XE::atom|entry> element
5181        indicates that the linked resource likely contains responses
5182        specific to that entry.
5183    
5184        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
5185        is supported, any <IF::Element> whose element type
5186        is <XE::atom|link> <kwd:MUST> implement the <IF::AtomLinkElementThread>
5187        interface in addition to other appropriate interfaces.
5188    
5189      @Test:
5190        @@QName: AtomLinkElementThread.1.test
5191        @@PerlDef:
5192          my $doc;
5193          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5194    
5195          my $el = $doc->create_element_ns (<Q::atom|>, 'link');
5196    
5197          $test->id ('interface');
5198          $test->assert_isa ($el, <IFName::AtomLinkElementThread>);
5199    
5200          $test->id ('feature');
5201          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
5202    
5203      @ATTR:
5204        @@Name: threadCount
5205        @@enDesc:
5206          The <XA::thr|count> attribute of the element.
5207    
5208          It <kwd:MUST> <I::reflect the non-negative integer value
5209          of the <XA::thr|count> attribute> of the node.
5210    
5211          An <XE::atom|link> element using the <XML::replies>
5212          <XA::rel> attribute value <kwd:MAY> contain
5213          a <XA::thr|count> attribute whose value is a
5214          non-negative integer that provides a hint to clients
5215          as to the total number of replies contained by the
5216          linked resource.  The value is advisory and
5217          may not accurately reflect the actual number of replies.
5218        @@Type: idl|long||ManakaiDOM|all
5219        @@Get:
5220          @@@PerlDef:
5221            __CODE{getReflectAttrNonNegativeIntegerValue::
5222              $node => $self,
5223              $namespaceURI => {<Q::thr|>},
5224              $localName => 'count',
5225              $r => $r,
5226              $defaultValue => {null},
5227            }__;
5228        @@Set:
5229          @@@NodeReadOnlyError:
5230          @@@PerlDef:
5231            __CODE{setReflectAttrNonNegativeIntegerValue::
5232              $node => $self,
5233              $namespaceURI => {<Q::thr|>},
5234              $localName => 'count',
5235              $given => $given,
5236            }__;
5237    
5238        @@Test:
5239          @@@QName: AtomLinkElementThread.threadCount.1.test
5240          @@@PerlDef:
5241            my $doc;
5242            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5243    
5244            my $link = $doc->create_element_ns (<Q::atom|>, 'link');
5245    
5246            $test->id ('default');
5247            $test->assert_num_equals
5248                     (expected_value => -1,
5249                      actual_value =>
5250                        $link-><AG::AtomLinkElementThread.threadCount>);
5251    
5252            $test->id ('zero');
5253            $link-><AS::AtomLinkElementThread.threadCount> (0);
5254            $test->assert_num_equals
5255                     (expected_value => 0,
5256                      actual_value =>
5257                        $link-><AG::AtomLinkElementThread.threadCount>);
5258            $test->id ('zero.attr');
5259            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '0');
5260    
5261            $test->id ('one');
5262            $link-><AS::AtomLinkElementThread.threadCount> (1);
5263            $test->assert_num_equals
5264                     (expected_value => 1,
5265                      actual_value =>
5266                        $link-><AG::AtomLinkElementThread.threadCount>);
5267            $test->id ('one.attr');
5268            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '1');
5269    
5270            $test->id ('10000');
5271            $link-><AS::AtomLinkElementThread.threadCount> (10000);
5272            $test->assert_num_equals
5273                     (expected_value => 10000,
5274                      actual_value =>
5275                        $link-><AG::AtomLinkElementThread.threadCount>);
5276            $test->id ('10000.attr');
5277            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'),
5278                                  '10000');
5279    
5280            $test->id ('+10000');
5281            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '+10000');
5282            $test->assert_num_equals
5283                     (expected_value => 10000,
5284                      actual_value =>
5285                        $link-><AG::AtomLinkElementThread.threadCount>);
5286    
5287            $test->id ('010000');
5288            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '010000');
5289            $test->assert_num_equals
5290                     (expected_value => 10000,
5291                      actual_value =>
5292                        $link-><AG::AtomLinkElementThread.threadCount>);
5293    
5294            $test->id ('-100');
5295            $link-><AS::AtomLinkElementThread.threadCount> (-100);
5296            $test->assert_num_equals
5297                     (expected_value => -1,
5298                      actual_value =>
5299                        $link-><AG::AtomLinkElementThread.threadCount>);
5300            $test->id ('-100.attr');
5301            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5302    
5303            $test->id ('120a');
5304            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '120a');
5305            $test->assert_num_equals
5306                     (expected_value => -1,
5307                      actual_value =>
5308                        $link-><AG::AtomLinkElementThread.threadCount>);
5309    
5310            $test->id ('-1');
5311            $link-><AS::AtomLinkElementThread.threadCount> (-1);
5312            $test->assert_num_equals
5313                     (expected_value => -1,
5314                      actual_value =>
5315                        $link-><AG::AtomLinkElementThread.threadCount>);
5316            $test->id ('-1.attr');
5317            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5318    
5319      @enImplNote:
5320        @@ddid: updated
5321        @@@:
5322          {TODO::
5323            <XA::thr|updated> attribute
5324          }
5325    ##AtomLinkElementThread
5326    
5327    enImplNote:
5328      @@ddid: total
5329      @@@:
5330        {TODO::
5331          <XE::thr|total>
5332        }
5333    
5334    enImplNote:
5335      @@ddid: threaddtd
5336      @@@:
5337        {TODO::
5338          DTD impl for threading
5339        }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.20

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24