/[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.13 by wakaba, Sun Sep 10 11:19:24 2006 UTC revision 1.22 by wakaba, Sat Dec 30 08:27:49 2006 UTC
# Line 50  Module: Line 50  Module:
50        @@@QName: Markup|common        @@@QName: Markup|common
51      @@Module:      @@Module:
52        @@@QName: MDOM|TreeCore        @@@QName: MDOM|TreeCore
       @@@WithFor: ManakaiDOM|ManakaiDOMLatest  
     @@Module:  
       @@@WithFor: ManakaiDOM|ManakaiDOM  
     @@Module:  
       @@@WithFor: ManakaiDOM|ManakaiDOMLatest  
53      @@Module:      @@Module:
54        @@@QName: DISlib|DISMarkup        @@@QName: DISlib|DISMarkup
       @@@WithFor: ManakaiDOM|all  
   @DefaultFor: ManakaiDOM|ManakaiDOMLatest  
55    
56  Namespace:  Namespace:
57    @atom:    @atom:
# Line 77  Namespace: Line 70  Namespace:
70      http://suika.fam.cx/~wakaba/archive/2004/dom/xdt#      http://suika.fam.cx/~wakaba/archive/2004/dom/xdt#
71    @DOMMain:    @DOMMain:
72      http://suika.fam.cx/~wakaba/archive/2004/dom/main#      http://suika.fam.cx/~wakaba/archive/2004/dom/main#
73      @domperl:
74        http://suika.fam.cx/~wakaba/archive/2006/dom/perl/
75    @dx:    @dx:
76      http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#      http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#
77    @dxm:    @dxm:
# Line 119  Namespace: Line 114  Namespace:
114      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/Element/
115    @test:    @test:
116      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#
117      @thr:
118        http://purl.org/syndication/thread/1.0
119    @tx:    @tx:
120      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/      http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/XML/
121    @urigen:    @urigen:
# Line 140  ElementTypeBinding: Line 137  ElementTypeBinding:
137      dis:ResourceDef      dis:ResourceDef
138    @ShadowContent:    @ShadowContent:
139      @@DISCore:resourceType: DISLang|Method      @@DISCore:resourceType: DISLang|Method
     @@ForCheck: !=ManakaiDOM|ManakaiDOM  
140    
141  ElementTypeBinding:  ElementTypeBinding:
142    @Name: Param    @Name: Param
# Line 162  ElementTypeBinding: Line 158  ElementTypeBinding:
158      dis:ResourceDef      dis:ResourceDef
159    @ShadowContent:    @ShadowContent:
160      @@DISCore:resourceType: DISLang|Attribute      @@DISCore:resourceType: DISLang|Attribute
     @@ForCheck: !=ManakaiDOM|ManakaiDOM  
161    
162  ElementTypeBinding:  ElementTypeBinding:
163    @Name: ATTR    @Name: ATTR
# Line 178  ElementTypeBinding: Line 173  ElementTypeBinding:
173      @@DISCore:resourceType:      @@DISCore:resourceType:
174        @@@@: mv|AttributeType        @@@@: mv|AttributeType
175        @@@ForCheck: s|ForML        @@@ForCheck: s|ForML
     @@ForCheck: !=ManakaiDOM|ManakaiDOM  
176    
177  ElementTypeBinding:  ElementTypeBinding:
178    @Name: Get    @Name: Get
# Line 243  ElementTypeBinding: Line 237  ElementTypeBinding:
237      @@resourceFor: ManakaiDOM|ForIF      @@resourceFor: ManakaiDOM|ForIF
238      @@resourceFor: ManakaiDOM|ForClass      @@resourceFor: ManakaiDOM|ForClass
239      @@resourceFor: s|ForML      @@resourceFor: s|ForML
     @@For: ManakaiDOM|ManakaiDOM  
240    
241      @@DISCore:resourceType:      @@DISCore:resourceType:
242        @@@@: DISLang|Interface        @@@@: DISLang|Interface
# Line 252  ElementTypeBinding: Line 245  ElementTypeBinding:
245      @@DISCore:resourceType:      @@DISCore:resourceType:
246        @@@@: DISLang|Class        @@@@: DISLang|Class
247        @@@ForCheck: ManakaiDOM|ForClass        @@@ForCheck: ManakaiDOM|ForClass
248    
249      @@Implement:      @@Implement:
250        @@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF        @@@@: ||+||ManakaiDOM|ForIF
       @@@ContentType: DISCore|TFPQNames  
       @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM  
     @@Implement:  
       @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF  
251        @@@ContentType: DISCore|TFPQNames        @@@ContentType: DISCore|TFPQNames
252        @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest        @@@ForCheck: ManakaiDOM|ForClass
253    
254      @@s:elementType:      @@s:elementType:
255        @@@@: ||+||s|ForML        @@@@: ||+||s|ForML
# Line 270  ElementTypeBinding: Line 260  ElementTypeBinding:
260        @@@@: s|ElementType        @@@@: s|ElementType
261        @@@ForCheck: s|ForML        @@@ForCheck: s|ForML
262    
     @@f:implements: AtomFeature10  
   
263  ElementTypeBinding:  ElementTypeBinding:
264    @Name: IFClsDef    @Name: IFClsDef
265    @ElementType:    @ElementType:
# Line 282  ElementTypeBinding: Line 270  ElementTypeBinding:
270        @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML        @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML
271      @@resourceFor: ManakaiDOM|ForIF      @@resourceFor: ManakaiDOM|ForIF
272      @@resourceFor: ManakaiDOM|ForClass      @@resourceFor: ManakaiDOM|ForClass
     @@For: ManakaiDOM|ManakaiDOM  
273    
274      @@DISCore:resourceType:      @@DISCore:resourceType:
275        @@@@: DISLang|Interface        @@@@: DISLang|Interface
# Line 291  ElementTypeBinding: Line 278  ElementTypeBinding:
278      @@DISCore:resourceType:      @@DISCore:resourceType:
279        @@@@: DISLang|Class        @@@@: DISLang|Class
280        @@@ForCheck: ManakaiDOM|ForClass        @@@ForCheck: ManakaiDOM|ForClass
281    
282      @@Implement:      @@Implement:
283        @@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF        @@@@: ||+||ManakaiDOM|ForIF
       @@@ContentType: DISCore|TFPQNames  
       @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM  
     @@Implement:  
       @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF  
284        @@@ContentType: DISCore|TFPQNames        @@@ContentType: DISCore|TFPQNames
285        @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest        @@@ForCheck: ManakaiDOM|ForClass
   
     @@f:implements: AtomFeature10  
286    
287  ElementTypeBinding:  ElementTypeBinding:
288    @Name: IFClsConstructDef    @Name: IFClsConstructDef
# Line 315  ElementTypeBinding: Line 297  ElementTypeBinding:
297      @@resourceFor: ManakaiDOM|ForClass      @@resourceFor: ManakaiDOM|ForClass
298      @@resourceFor: mv|ForCM      @@resourceFor: mv|ForCM
299      @@resourceFor: mv|ForAG      @@resourceFor: mv|ForAG
     @@For: ManakaiDOM|ManakaiDOM  
300    
301      @@DISCore:resourceType:      @@DISCore:resourceType:
302        @@@@: DISLang|Interface        @@@@: DISLang|Interface
# Line 324  ElementTypeBinding: Line 305  ElementTypeBinding:
305      @@DISCore:resourceType:      @@DISCore:resourceType:
306        @@@@: DISLang|Class        @@@@: DISLang|Class
307        @@@ForCheck: ManakaiDOM|ForClass        @@@ForCheck: ManakaiDOM|ForClass
308    
309      @@Implement:      @@Implement:
310        @@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF        @@@@: ||+||ManakaiDOM|ForIF
       @@@ContentType: DISCore|TFPQNames  
       @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM  
     @@Implement:  
       @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF  
311        @@@ContentType: DISCore|TFPQNames        @@@ContentType: DISCore|TFPQNames
312        @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest        @@@ForCheck: ManakaiDOM|ForClass
313    
314      @@DISCore:resourceType:      @@DISCore:resourceType:
315        @@@@: mv|AttributeTypeGroup        @@@@: mv|AttributeTypeGroup
# Line 341  ElementTypeBinding: Line 319  ElementTypeBinding:
319        @@@@: mv|ElementContentModel        @@@@: mv|ElementContentModel
320        @@@ForCheck: mv|ForCM        @@@ForCheck: mv|ForCM
321    
     @@f:implements: AtomFeature10  
322    
323  ElementTypeBinding:  ElementTypeBinding:
324    @Name: IFQName    @Name: IFQName
# Line 449  ElementTypeBinding: Line 426  ElementTypeBinding:
426  ResourceDef:  ResourceDef:
427    @QName: Document    @QName: Document
428    @AliasFor: td|Document    @AliasFor: td|Document
   @For: ManakaiDOM|DOM  
429    
430  ResourceDef:  ResourceDef:
431    @QName: Element    @QName: Element
432    @AliasFor: te|Element    @AliasFor: te|Element
   @For: ManakaiDOM|DOM  
433    
434  ResourceDef:  ResourceDef:
435    @QName: Attr    @QName: Attr
436    @AliasFor: te|Attr    @AliasFor: te|Attr
   @For: ManakaiDOM|DOM  
437    
438  ResourceDef:  ResourceDef:
439    @QName: DOMString    @QName: DOMString
440    @AliasFor: DOMMain|DOMString    @AliasFor: DOMMain|DOMString
   @For: ManakaiDOM|DOM  
441    
442  ResourceDef:  ResourceDef:
443    @QName: DOMURI    @QName: DOMURI
444    @AliasFor: ManakaiDOM|ManakaiDOMURI    @AliasFor: ManakaiDOM|ManakaiDOMURI
   @For: ManakaiDOM|DOM3  
445    
446  ResourceDef:  ResourceDef:
447    @QName: DOMTimeStamp    @QName: DOMTimeStamp
448    @AliasFor: DOMMain|DOMTimeStamp    @AliasFor: DOMMain|DOMTimeStamp
   @For: ManakaiDOM|DOM2  
449    
450  ResourceDef:  ResourceDef:
451    @QName: boolean    @QName: boolean
# Line 483  ResourceDef: Line 454  ResourceDef:
454  ResourceDef:  ResourceDef:
455    @QName: Node    @QName: Node
456    @AliasFor: tc|Node    @AliasFor: tc|Node
   @For: ManakaiDOM|ManakaiDOM  
457    
458  ResourceDef:  ResourceDef:
459    @QName: NodeList    @QName: NodeList
460    @AliasFor: tc|NodeList    @AliasFor: tc|NodeList
   @For: ManakaiDOM|ManakaiDOM  
461    
462  ResourceDef:  ResourceDef:
463    @QName: StaticNodeList    @QName: StaticNodeList
464    @AliasFor: tc|StaticNodeList    @AliasFor: tc|StaticNodeList
   @For: ManakaiDOM|ManakaiDOM  
465    
466  ElementTypeBinding:  ElementTypeBinding:
467    @Name: enDesc    @Name: enDesc
# Line 568  FeatureDef: Line 536  FeatureDef:
536      @@enDesc:      @@enDesc:
537        The Atom DOM, version 1.0.        The Atom DOM, version 1.0.
538    
539    FeatureDef:
540      @featureQName: fe|AtomThreading
541      @QName: AtomThreadingFeature
542      @FeatureVerDef:
543        @@QName: AtomThreadingFeature10
544        @@Version: 1.0
545        @@f:instanceOf: AtomThreadingFeature
546        @@f:requires: fe|AtomFeature10
547        @@enDesc:
548          The Atom Threading Extension DOM, version 1.0.
549    
550  ## -- Modules  ## -- Modules
551    
552  ModuleSetDef:  ModuleSetDef:
# Line 658  ResourceDef: Line 637  ResourceDef:
637    @QName: AtomQName    @QName: AtomQName
638    @enLN: Qualified Names    @enLN: Qualified Names
639    @mv:id: qname    @mv:id: qname
   @For: =ManakaiDOM|ManakaiDOMLatest  
640    @DISCore:resourceType: mv|XMLDTDQNameModule    @DISCore:resourceType: mv|XMLDTDQNameModule
641    
642    @mv:contains: Atom    @mv:contains: Atom
# Line 667  ResourceDef: Line 645  ResourceDef:
645    @QName: Atom10    @QName: Atom10
646    @enLN: Atom 1.0    @enLN: Atom 1.0
647    @mv:id: atom10    @mv:id: atom10
   @For: =ManakaiDOM|ManakaiDOMLatest  
648    @DISCore:resourceType: mv|XMLDTDDriver    @DISCore:resourceType: mv|XMLDTDDriver
649    
650    @mv:refers: Atom    @mv:refers: Atom
# Line 684  ElementTypeBinding: Line 661  ElementTypeBinding:
661      dis:ResourceDef      dis:ResourceDef
662    @ShadowContent:    @ShadowContent:
663      @@DISCore:resourceType: mv|XMLDTDModuleSet      @@DISCore:resourceType: mv|XMLDTDModuleSet
     @@For: =ManakaiDOM|ManakaiDOMLatest  
664    
665  ElementTypeBinding:  ElementTypeBinding:
666    @Name: ModuleDef    @Name: ModuleDef
# Line 692  ElementTypeBinding: Line 668  ElementTypeBinding:
668      dis:ResourceDef      dis:ResourceDef
669    @ShadowContent:    @ShadowContent:
670      @@DISCore:resourceType: mv|XMLDTDModule      @@DISCore:resourceType: mv|XMLDTDModule
     @@For: =ManakaiDOM|ManakaiDOMLatest  
671    
672  ## -- Implementation  ## -- Implementation
673    
# Line 700  IFClsDef: Line 675  IFClsDef:
675    @IFQName: AtomImplementation    @IFQName: AtomImplementation
676    @ClsQName: ManakaiAtomImplementation    @ClsQName: ManakaiAtomImplementation
677    
678    @IFISA: c|DOMImplementation    @domperl:implementedByObjectsOf: c|DOMImplementation
679    @ClsISA: c|ManakaiDOMImplementation    @domperl:classImplementedByObjectsOf: c|ManakaiDOMImplementation
680    
681    @enDesc:    @enDesc:
682      The <IF::AtomImplementation> interface provides convenience      The <IF::AtomImplementation> interface provides convenience
683      methods to create Atom documents.      methods to create Atom documents.
684    
685    @f:provides: AtomFeature10    @f:provides: AtomFeature10
686      @f:implements: AtomFeature10
687    
688    @Test:    @Test:
689      @@QName: AtomImplementation.interface.test      @@QName: AtomImplementation.interface.test
690      @@PerlDef:      @@PerlDef:
691        for my $interface (        for my $interface (
692          <IFName::AtomImplementation>,          <IFName::AtomImplementation>,
         <IFName::AtomImplementation||ManakaiDOM|ManakaiDOM>,  
693          <IFName::c|DOMImplementation>,          <IFName::c|DOMImplementation>,
         <IFName::urigen|URIImplementation>,  
         <IFName::f|MinimumImplementation>,  
694          <IFName::f|GetFeature>,          <IFName::f|GetFeature>,
695        ) {        ) {
696          $test->id ($interface);          $test->id ($interface);
697          $test->assert_true          $test->assert_true
698                   (<Class::ManakaiAtomImplementation>->isa ($interface));                   (<Class::c|ManakaiDOMImplementation>->isa ($interface));
699        }        }
700    @Test:    @Test:
701      @@QName: ImplementationRegistry.AtomImplementation.1.test      @@QName: ImplementationRegistry.AtomImplementation.1.test
702      @@PerlDef:      @@PerlDef:
703        require Message::Markup::Atom;        require Message::Markup::Atom;
704        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
705                     ->get_implementation ({                     ->get_dom_implementation ({
706                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
707                       });                       });
708    
# Line 739  IFClsDef: Line 712  IFClsDef:
712      @@PerlDef:      @@PerlDef:
713        require Message::Markup::Atom;        require Message::Markup::Atom;
714        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
715                     ->get_implementation ({                     ->get_dom_implementation ({
716                         Core => '3.0',                         Core => '3.0',
717                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
718                       });                       });
# Line 750  IFClsDef: Line 723  IFClsDef:
723      @@PerlDef:      @@PerlDef:
724        require Message::Markup::Atom;        require Message::Markup::Atom;
725        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
726                     ->get_implementation ({                     ->get_dom_implementation ({
727                         XML => '3.0',                         XML => '3.0',
728                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
729                       });                       });
# Line 786  IFClsDef: Line 759  IFClsDef:
759            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
760            as if an empty string is specified.            as if an empty string is specified.
761      @@Return:      @@Return:
762        @@@Type: AtomFeedDocument        @@@Type: AtomDocument
763        @@@enDesc:        @@@enDesc:
764          The newly created Atom Feed Document.          The newly created Atom Feed Document.
765    
# Line 969  IFClsDef: Line 942  IFClsDef:
942            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
943            as if an empty string is specified.            as if an empty string is specified.
944      @@Return:      @@Return:
945        @@@Type: AtomEntryDocument        @@@Type: AtomDocument
946        @@@enDesc:        @@@enDesc:
947          The newly created Atom Entry Document.          The newly created Atom Entry Document.
948    
# Line 1512  IFClsDef: Line 1485  IFClsDef:
1485          <QUOTE::reflecting Date child element> attribute should          <QUOTE::reflecting Date child element> attribute should
1486          be provided for published and created?          be provided for published and created?
1487        }        }
 ##AtomImplementation  
1488    
1489  IFClsDef:    @CODE:
1490    @IFQName: AtomDocument      @@QName: getReflectAttrNonNegativeIntegerValue
1491    @ClsQName: ManakaiAtomDocument      @@enDesc:
1492          {P:: If a DOM attribute is defined to <DFN::reflect the
1493               non-negative integer value of the <VAR::attr-name> attribute>
1494               of the node <VAR::E>, the getter of the attribute <kwd:MUST>
1495               return the value defined by the algorithm:
1496    
1497            {OLI:: If the <VAR::E> contains an attribute node <VAR::A> whose name
1498                   is <VAR::attr-name>:
1499    
1500              = If the <A::Node.nodeValue> of the <VAR::A> is
1501                one or more sequence of digits (<CHAR::DIGIT ZERO>,
1502                <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>) optionally
1503                preceding by a <CHAR::PLUS SIGN>, then
1504                the attribute getter <kwd:MUST> return a value
1505                by interpreting the <A::Node.nodeValue> of the <VAR::A>
1506                as a decimal number.
1507    
1508    @IFISA: Document          }
   @ClsISA: td|ManakaiDOMDocument  
1509    
1510    @s:rootElementType: AnyAtomElement||ManakaiDOM|all          = If a default value is explicitly defined
1511              where this algorithm is referenced, it <kwd:MUST>
1512              return the default value.
1513    
1514    @enDesc:          = Otherwise, it <kwd:MUST> return a binding-specific
1515      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>            default value, if it is defined by the specification
1516      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.  
1517    
1518    @Test:        }
     @@QName: createDocument.AtomDocument.test  
     @@PerlDef:  
       my $impl;  
       __CODE{tc|createImplForTest:: $impl => $impl}__;  
       
       my $doc = $impl-><M::c|DOMImplementation.createDocument>  
                          (<Q::atom|>, 'unknown');  
1519    
1520        $test->id ('interface');          {NOTE::
1521        $test->assert_isa ($doc, <IFName::AtomDocument>);            In Atom Threading Extension <SRC::RFC 4685>,
1522  ##AtomDocument            the <CHAR::PLUS SIGN> and leading <CHAR::DIGIT ZERO>s
1523              are prohibitted.
1524            }
1525        @@PerlDef:
1526          __DEEP{
1527            E: {
1528              $r = $node-><M::Element.getAttributeNS> ($namespaceURI, $localName);
1529              if (defined $r) {
1530                if ($r =~ /\A\+?([0-9]+)\z/) {
1531                  $r = 0+$1;
1532                  last E;
1533                }
1534              }
1535    
1536  IFClsDef:            $r = $defaultValue;
1537    @IFQName: AtomFeedDocument            $r = -1 unless defined $r;
1538    @ClsQName: ManakaiFeedEntryDocument          } # E
1539          }__;
1540    
1541    @IFISA: AtomDocument    @CODE:
1542    @ClsISA: ManakaiAtomDocument      @@QName: setReflectAttrNonNegativeIntegerValue
1543        @@enDesc:
1544          {P:: If a DOM attribute is defined to <DFN::reflect the
1545               non-negative integer value
1546               of the <VAR::attr-name> attribute> of the node <VAR::E>,
1547               the setter of the attribute <kwd:MUST> modify the node as
1548               defined by the algorithm:
1549    
1550    @s:rootElementType:          = If the given value is <DOM::-1> or one of binding-specific
1551      @@@: atom|feed            default values, if any, as defined by the specification
1552      @@DISCore:stopISARecursive: 1            of the binding, it <kwd:MUST>
1553              remove the <VAR::attr-name> attribute node, if any,
1554              from the list of attribute nodes of <VAR::E>.
1555    
1556    @enDesc:          = Otherwise, it <kwd:MUST> set the <VAR::attr-name>
1557      The <IF::AtomFeedDocument> interface provides convenience            attribute node value to a string representation
1558      methods and attributes for an Atom            of the given value as if
1559      Feed Document, i.e. representation of an Atom feed.            the <M::Element.setAttributeNS> method were invoked.
1560              The string representation <kwd:MUST> be a decimal
1561              number consist of one or more sequence of digits
1562              (<CHAR::DIGIT ZERO>, <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>)
1563              <EM::without> any leading <CHAR::DIGIT ZERO>.
1564              The <CHAR::PLUS SIGN> <kwd:MUST> be omitted.
1565    
1566      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.  
1567    
1568    @Test:          {NOTE::
1569      @@QName: createDocument.AtomFeedDocument.test            It might throw an exception.
1570            }
1571      @@PerlDef:      @@PerlDef:
1572        my $impl;        __DEEP{
1573        __CODE{tc|createImplForTest:: $impl => $impl}__;          if (defined $given and $given >= 0) {
1574                  $node-><M::Element.setAttributeNS>
1575        my $doc = $impl-><M::c|DOMImplementation.createDocument>                     ($namespaceURI, $localName, 0+$given);
1576                           (<Q::atom|>, 'feed');          } else {
1577              $node-><M::Element.removeAttributeNS> ($namespaceURI, $localName);
1578        $test->id ('interface');          }
1579        $test->assert_isa ($doc, <IFName::AtomFeedDocument>);        }__;
1580  ##AtomFeedDocument  ##AtomImplementation
1581    
1582  IFClsDef:  IFClsDef:
1583    @IFQName: AtomEntryDocument    @IFQName: AtomDocument
1584    @ClsQName: ManakaiAtomEntryDocument    @ClsQName: ManakaiAtomDocument
1585    
1586    @IFISA: AtomDocument    @domperl:implementedByObjectsOf: Document
1587    @ClsISA: ManakaiAtomDocument    @domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument
1588    
1589    @s:rootElementType:    @f:implements: AtomFeature10
     @@@: atom|entry  
     @@DISCore:stopISARecursive: 1  
1590    
1591    @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.  
   
1592      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>
1593      is supported, a <IF::Document> object whose <A::Document.documentElement>'s      is supported, a <IF::Document> object whose <A::Document.documentElement>'s
1594      element type, if any, is <XE::atom|entry> at least at      <A::Node.namespaceURI>, if any, is <URI^^DISCore|QName::atom|> at least
1595      the time of the creation <kwd:MUST> also      at the time of creation <kwd:MUST> also
1596      implement the <IF::AtomEntryDocument> interface.  Other      implement the <IF::AtomDocument> interface.  Other
1597      <IF::Document> objects <kwd:MAY> also implement      <IF:Document> objects <kwd:MAY> also implement
1598      the <IF::AtomEntryDocument> interface.      the <IF::AtomDocument> interface.
1599    
1600    @Test:    @Test:
1601      @@QName: createDocument.AtomEntryDocument.test      @@QName: createDocument.AtomDocument.test
1602      @@PerlDef:      @@PerlDef:
1603        my $impl;        my $impl;
1604        __CODE{tc|createImplForTest:: $impl => $impl}__;        __CODE{tc|createImplForTest:: $impl => $impl}__;
1605            
1606        my $doc = $impl-><M::c|DOMImplementation.createDocument>        my $doc = $impl-><M::c|DOMImplementation.createDocument>
1607                           (<Q::atom|>, 'entry');                           (<Q::atom|>, 'unknown');
1608    
1609        $test->id ('interface');        $test->id ('interface');
1610        $test->assert_isa ($doc, <IFName::AtomEntryDocument>);        $test->assert_isa ($doc, <IFName::AtomDocument>);
1611  ##AtomEntryDocument  ##AtomDocument
1612    
1613  AGDef:  AGDef:
1614    @QName: atomCommonAttributes    @QName: atomCommonAttributes
# Line 1681  ElementTypeBinding: Line 1671  ElementTypeBinding:
1671      dis:ResourceDef      dis:ResourceDef
1672    @ShadowContent:    @ShadowContent:
1673      @@DISCore:resourceType: mv|AttributeTypeGroup      @@DISCore:resourceType: mv|AttributeTypeGroup
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1674    
1675  ElementTypeBinding:  ElementTypeBinding:
1676    @Name: ATDef    @Name: ATDef
# Line 1689  ElementTypeBinding: Line 1678  ElementTypeBinding:
1678      dis:ResourceDef      dis:ResourceDef
1679    @ShadowContent:    @ShadowContent:
1680      @@DISCore:resourceType: mv|AttributeType      @@DISCore:resourceType: mv|AttributeType
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1681    
1682  ElementTypeBinding:  ElementTypeBinding:
1683    @Name: ECDef    @Name: ECDef
# Line 1697  ElementTypeBinding: Line 1685  ElementTypeBinding:
1685      dis:ResourceDef      dis:ResourceDef
1686    @ShadowContent:    @ShadowContent:
1687      @@DISCore:resourceType: mv|ElementTypeClass      @@DISCore:resourceType: mv|ElementTypeClass
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1688    
1689  ElementTypeBinding:  ElementTypeBinding:
1690    @Name: EMDef    @Name: EMDef
# Line 1705  ElementTypeBinding: Line 1692  ElementTypeBinding:
1692      dis:ResourceDef      dis:ResourceDef
1693    @ShadowContent:    @ShadowContent:
1694      @@DISCore:resourceType: mv|ElementTypeClassMix      @@DISCore:resourceType: mv|ElementTypeClassMix
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1695    
1696  ElementTypeBinding:  ElementTypeBinding:
1697    @Name: STDef    @Name: STDef
# Line 1713  ElementTypeBinding: Line 1699  ElementTypeBinding:
1699      dis:ResourceDef      dis:ResourceDef
1700    @ShadowContent:    @ShadowContent:
1701      @@DISCore:resourceType: mv|XMLDTDDatatypeEntity      @@DISCore:resourceType: mv|XMLDTDDatatypeEntity
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1702    
1703  ElementTypeBinding:  ElementTypeBinding:
1704    @Name: STCDef    @Name: STCDef
# Line 1721  ElementTypeBinding: Line 1706  ElementTypeBinding:
1706      dis:ResourceDef      dis:ResourceDef
1707    @ShadowContent:    @ShadowContent:
1708      @@DISCore:resourceType: mv|ElementContentModel      @@DISCore:resourceType: mv|ElementContentModel
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1709    
1710  IFClsDef:  IFClsDef:
1711    @IFQName: AtomElement    @IFQName: AtomElement
# Line 1730  IFClsDef: Line 1714  IFClsDef:
1714    @IFISA: Element    @IFISA: Element
1715    @ClsISA: te|ManakaiDOMElement    @ClsISA: te|ManakaiDOMElement
1716        
1717      @f:implements: AtomFeature10
1718    @s:elementType: AnyAtomElement||ManakaiDOM|all    @s:elementType: AnyAtomElement||ManakaiDOM|all
1719    
1720    @enDesc:    @enDesc:
# Line 1755  IFClsDef: Line 1740  IFClsDef:
1740      @@PerlDef:      @@PerlDef:
1741        for my $interface (        for my $interface (
1742          <IFName::AtomElement>,          <IFName::AtomElement>,
         <IFName::AtomElement||ManakaiDOM|ManakaiDOM>,  
1743          <IFName::Element>,          <IFName::Element>,
1744          <IFName::Node>,          <IFName::Node>,
1745          <IFName::f|GetFeature>,          <IFName::f|GetFeature>,
# Line 1799  IFClsConstructDef: Line 1783  IFClsConstructDef:
1783    @IFISA: AtomElement    @IFISA: AtomElement
1784    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1785    
1786      @f:implements: AtomFeature10
1787    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1788    
1789    @cm:    @cm:
# Line 1940  IFClsConstructDef: Line 1925  IFClsConstructDef:
1925    @IFISA: AtomElement    @IFISA: AtomElement
1926    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1927    
1928      @f:implements: AtomFeature10
1929    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1930    
1931    @cm:    @cm:
# Line 2096  IFClsConstructDef: Line 2082  IFClsConstructDef:
2082    @IFISA: AtomElement    @IFISA: AtomElement
2083    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2084    
2085      @f:implements: AtomFeature10
2086    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2087    
2088    @cm:    @cm:
# Line 2203  IFClsETDef: Line 2190  IFClsETDef:
2190    @IFISA: AtomElement    @IFISA: AtomElement
2191    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2192    
2193      @f:implements: AtomFeature10
2194    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2195    
2196    @cm:    @cm:
# Line 2926  IFClsETDef: Line 2914  IFClsETDef:
2914    @IFISA: AtomElement    @IFISA: AtomElement
2915    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2916    
2917      @f:implements: AtomFeature10
2918    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2919    
2920    @cm:    @cm:
# Line 3103  IFClsETDef: Line 3092  IFClsETDef:
3092          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);
3093    
3094          $test->id ('parent');          $test->id ('parent');
3095            my $parent;
3096          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3097              $parent = $_;
3098            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3099                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3100            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3123  IFClsETDef: Line 3114  IFClsETDef:
3114          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');
3115    
3116          $test->id ('parent');          $test->id ('parent');
3117            my $parent;
3118          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3119              $parent = $_;
3120            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3121                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3122            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3459  IFClsETDef: Line 3452  IFClsETDef:
3452    @IFISA: AtomElement    @IFISA: AtomElement
3453    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3454    
3455      @f:implements: AtomFeature10
3456    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3457        
3458    @cm: atomUriCM    @cm: atomUriCM
# Line 3473  IFClsETDef: Line 3467  IFClsETDef:
3467    @IFISA: AtomElement    @IFISA: AtomElement
3468    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3469    
3470      @f:implements: AtomFeature10
3471    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3472    
3473    @cm: atomUriCM    @cm: atomUriCM
# Line 3487  IFClsETDef: Line 3482  IFClsETDef:
3482    @IFISA: AtomElement    @IFISA: AtomElement
3483    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3484    
3485      @f:implements: AtomFeature10
3486    # no common attribs    # no common attribs
3487    @cm: TextCM    @cm: TextCM
3488    
# Line 3502  IFClsETDef: Line 3498  IFClsETDef:
3498    @IFISA: AtomElement    @IFISA: AtomElement
3499    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3500    
3501      @f:implements: AtomFeature10
3502    # no common attribs    # no common attribs
3503    @cm: atomUriCM    @cm: atomUriCM
3504    
# Line 3517  IFClsETDef: Line 3514  IFClsETDef:
3514    @IFISA: AtomElement    @IFISA: AtomElement
3515    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3516    
3517      @f:implements: AtomFeature10
3518    # no common attribs    # no common attribs
3519    @cm: atomEmailAddressCM    @cm: atomEmailAddressCM
3520    
# Line 3532  IFClsETDef: Line 3530  IFClsETDef:
3530    @IFISA: AtomElement    @IFISA: AtomElement
3531    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3532    
3533      @f:implements: AtomFeature10
3534    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3535    
3536    @cm: atomUriCM    @cm: atomUriCM
# Line 3546  IFClsETDef: Line 3545  IFClsETDef:
3545    @IFISA: AtomElement    @IFISA: AtomElement
3546    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3547    
3548      @f:implements: AtomFeature10
3549    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3550    
3551    @cm:    @cm:
# Line 3799  IFClsETDef: Line 3799  IFClsETDef:
3799    
3800    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3801    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3802    
3803      @f:implements: AtomFeature10
3804    @mv:refers: PersonAG    @mv:refers: PersonAG
3805    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3806    
# Line 3816  IFClsETDef: Line 3818  IFClsETDef:
3818    @IFISA: AtomElement    @IFISA: AtomElement
3819    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3820    
3821      @f:implements: AtomFeature10
3822    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3823    
3824    @cm: undefinedContent    @cm: undefinedContent
# Line 3933  IFClsETDef: Line 3936  IFClsETDef:
3936    
3937    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3938    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3939    
3940      @f:implements: AtomFeature10
3941    @mv:refers: PersonAG    @mv:refers: PersonAG
3942    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3943    
# Line 3951  IFClsETDef: Line 3956  IFClsETDef:
3956    @IFISA: AtomElement    @IFISA: AtomElement
3957    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3958    
3959      @f:implements: AtomFeature10
3960    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3961    
3962    @cm:    @cm:
# Line 4037  IFClsETDef: Line 4043  IFClsETDef:
4043    @IFISA: AtomElement    @IFISA: AtomElement
4044    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4045    
4046      @f:implements: AtomFeature10
4047    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4048    
4049    @cm: undefinedContent    @cm: undefinedContent
# Line 4172  IFClsETDef: Line 4179  IFClsETDef:
4179        of the <XA::type> attribute> of the node.        of the <XA::type> attribute> of the node.
4180      @@Type: DOMString      @@Type: DOMString
4181      @@Get:      @@Get:
4182          @@@enDesc:
4183            {P:: If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4184                 is supported, the attribute getter <kwd:MUST> return
4185                 the string <CODE::application/atom+xml> when both of the
4186                 following conditions are met:
4187    
4188               - The attribute getter would otherwise return <DOM::null>.
4189    
4190               - The <A::AtomLinkElement.rel> attribute contains
4191                 a string value of <URI^^DISCore|QName::rel|replies>.
4192    
4193            }
4194        @@@nullCase:        @@@nullCase:
4195          @@@@enDesc:          @@@@enDesc:
4196            If the algorithm returns <DOM::null>.            If the algorithm returns <DOM::null>.
# Line 4183  IFClsETDef: Line 4202  IFClsETDef:
4202            $r => $r,            $r => $r,
4203            $defaultValue => {null},            $defaultValue => {null},
4204          }__;          }__;
4205    
4206            unless (defined $r) {
4207              __DEEP{
4208                my $rel = $self-><AG::AtomLinkElement.rel>;
4209                if (defined $rel and $rel eq <Q::rel|replies>) {
4210                  $r = q<application/atom+xml>;
4211                }
4212              }__;
4213            }
4214      @@Set:      @@Set:
4215        @@@nullCase:        @@@nullCase:
4216          @@@@enDesc:          @@@@enDesc:
# Line 4196  IFClsETDef: Line 4224  IFClsETDef:
4224            $given => $given,            $given => $given,
4225          }__;          }__;
4226    
4227        @@Test:
4228          @@@QName: AtomLinkElement.type.!rel.test
4229          @@@PerlDef:
4230            my $doc;
4231            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4232    
4233            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4234    
4235            $test->id ('implied');
4236            my $type0 = $el-><AG::AtomLinkElement.type>;
4237            $test->assert_null ($type0);
4238    
4239            $test->id ('explicit');
4240            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4241            my $type1 = $el-><AG::AtomLinkElement.type>;
4242            $test->assert_equals ($type1, q<application/atom+xml>);
4243    
4244            $test->id ('different');
4245            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4246            my $type2 = $el-><AG::AtomLinkElement.type>;
4247            $test->assert_equals ($type2, q<application/xhtml+xml>);
4248        @@Test:
4249          @@@QName: AtomLinkElement.type.rel!=replies.test
4250          @@@PerlDef:
4251            my $doc;
4252            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4253    
4254            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4255    
4256            $el-><AS::AtomLinkElement.rel> (<Q::rel|alternate>);
4257    
4258            $test->id ('implied');
4259            my $type0 = $el-><AG::AtomLinkElement.type>;
4260            $test->assert_null ($type0);
4261    
4262            $test->id ('explicit');
4263            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4264            my $type1 = $el-><AG::AtomLinkElement.type>;
4265            $test->assert_equals ($type1, q<application/atom+xml>);
4266    
4267            $test->id ('different');
4268            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4269            my $type2 = $el-><AG::AtomLinkElement.type>;
4270            $test->assert_equals ($type2, q<application/xhtml+xml>);
4271        @@Test:
4272          @@@QName: AtomLinkElement.type.rel=replies.test
4273          @@@PerlDef:
4274            my $doc;
4275            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4276    
4277            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4278    
4279            $el-><AS::AtomLinkElement.rel> (<Q::rel|replies>);
4280    
4281            $test->id ('implied');
4282            my $type0 = $el-><AG::AtomLinkElement.type>;
4283            $test->assert_equals ($type0, q<application/atom+xml>);
4284    
4285            $test->id ('explicit');
4286            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4287            my $type1 = $el-><AG::AtomLinkElement.type>;
4288            $test->assert_equals ($type1, q<application/atom+xml>);
4289    
4290            $test->id ('different');
4291            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4292            my $type2 = $el-><AG::AtomLinkElement.type>;
4293            $test->assert_equals ($type2, q<application/xhtml+xml>);
4294    
4295    @ATTR:    @ATTR:
4296      @@Name: hreflang      @@Name: hreflang
4297      @@enDesc:      @@enDesc:
# Line 4304  IFClsETDef: Line 4400  IFClsETDef:
4400    
4401    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4402    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4403    
4404      @f:implements: AtomFeature10
4405    @mv:refers: DateAG    @mv:refers: DateAG
4406    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4407    
# Line 4324  IFClsETDef: Line 4422  IFClsETDef:
4422    
4423    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4424    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4425    
4426      @f:implements: AtomFeature10
4427    @mv:refers: TextAG    @mv:refers: TextAG
4428    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4429    
# Line 4359  IFClsETDef: Line 4459  IFClsETDef:
4459    @IFISA: AtomElement    @IFISA: AtomElement
4460    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4461    
4462      @f:implements: AtomFeature10
4463    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4464    
4465    @cm:    @cm:
# Line 4573  IFClsETDef: Line 4674  IFClsETDef:
4674    
4675    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4676    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4677    
4678      @f:implements: AtomFeature10
4679    @mv:refers: TextAG    @mv:refers: TextAG
4680    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4681    
# Line 4589  IFClsETDef: Line 4692  IFClsETDef:
4692    
4693    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4694    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4695    
4696      @f:implements: AtomFeature10
4697    @mv:refers: TextAG    @mv:refers: TextAG
4698    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4699    
# Line 4605  IFClsETDef: Line 4710  IFClsETDef:
4710    
4711    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4712    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4713    
4714      @f:implements: AtomFeature10
4715    @mv:refers: TextAG    @mv:refers: TextAG
4716    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4717    
# Line 4621  IFClsETDef: Line 4728  IFClsETDef:
4728    
4729    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4730    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4731    
4732      @f:implements: AtomFeature10
4733    @mv:refers: DateAG    @mv:refers: DateAG
4734    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4735    
# Line 4697  boolCParam: Line 4806  boolCParam:
4806  ResourceDef:  ResourceDef:
4807    @QName: CFG    @QName: CFG
4808    @AliasFor: c|DOMConfiguration    @AliasFor: c|DOMConfiguration
   @For: ManakaiDOM|DOM3  
4809    
4810  ElementTypeBinding:  ElementTypeBinding:
4811    @Name: boolCParam    @Name: boolCParam
# Line 4706  ElementTypeBinding: Line 4814  ElementTypeBinding:
4814    @ShadowContent:    @ShadowContent:
4815      @@DISCore:resourceType:      @@DISCore:resourceType:
4816        @@@@: c|DOMConfigurationParameter        @@@@: c|DOMConfigurationParameter
       @@@For: ManakaiDOM|DOM  
4817      @@DISCore:resourceType:      @@DISCore:resourceType:
4818        @@@@: DISCore|Property        @@@@: DISCore|Property
4819        @@@For: =ManakaiDOM|all        @@@For: =ManakaiDOM|all
     @@For: ManakaiDOM|DOM3  
     @@For: =ManakaiDOM|all  
4820      @@Type: idl|boolean||ManakaiDOM|all      @@Type: idl|boolean||ManakaiDOM|all
4821    
4822  ECDef:  ECDef:
# Line 4738  AGDef: Line 4843  AGDef:
4843  ResourceDef:  ResourceDef:
4844    @QName: undefinedContent    @QName: undefinedContent
4845    @mv:elementContentModelName: undefined    @mv:elementContentModelName: undefined
   @For: =ManakaiDOM|ManakaiDOMLatest  
4846    @DISCore:resourceType: mv|ElementContentModel    @DISCore:resourceType: mv|ElementContentModel
4847    @cm: dxm|ANY||ManakaiDOM|all    @cm: dxm|ANY||ManakaiDOM|all
4848    @enImplNote:    @enImplNote:
4849      (text | anyForeignElement)*      (text | anyForeignElement)*
4850    
4851    ## -- Atom Threading Extension [RFC 4685]
4852    
4853    IFClsDef:
4854      @IFQName: AtomEntryElementThread
4855      @ClsQName: ManakaiAtomEntryElementThread
4856    
4857      @ClsISA: ManakaiAtomEntryElement
4858    
4859      @f:implements: AtomThreadingFeature10
4860    
4861      @enDesc:
4862        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4863        is supported, any <IF::Element> whose element type
4864        is <XE::atom|entry> <kwd:MUST> implement the <IF::AtomEntryElementThread>
4865        interface in addition to other appropriate interfaces.
4866    
4867      @Test:
4868        @@QName: AtomEntryElementThread.1.test
4869        @@PerlDef:
4870          my $doc;
4871          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4872    
4873          my $el = $doc->create_element_ns (<Q::atom|>, 'entry');
4874    
4875          $test->id ('interface');
4876          $test->assert_isa ($el, <IFName::AtomEntryElementThread>);
4877    
4878          $test->id ('feature');
4879          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4880    
4881      @Attr:
4882        @@Name: threadInReplyToElements
4883        @@enDesc:
4884          A static list of <XE::thr|in-reply-to> child elements of the node.
4885        @@Type: StaticNodeList
4886        @@Get:
4887          @@@enDesc:
4888            It <kwd:MUST> <I::return a <XE::thr|in-reply-to> child element list>
4889            of the node.
4890          @@@PerlDef:
4891            __CODE{returnChildElementList::
4892              $node => $self,
4893              $namespaceURI => {<Q::thr|>},
4894              $localName => 'in-reply-to',
4895              $r => $r,
4896            }__;
4897    ##AtomEntryElementThread
4898    
4899    IFClsETDef:
4900      @IFQName: AtomThreadInReplyToElement
4901      @ETQName: thr|in-reply-to
4902      @ETRQName: thr|in-reply-to
4903      @ClsQName: ManakaiAtomThreadInReplyToElement
4904    
4905      @IFISA: AtomDateConstruct
4906      @ClsISA: ManakaiAtomDateConstruct
4907    
4908      @f:implements: AtomThreadingFeature10
4909      @mv:refers: atomCommonAttributes
4910    
4911      @cm: undefinedContent
4912    
4913      @enDesc:
4914        The <XE::thr|in-reply-to> element is used to indicate
4915        that an entry is a response to another resource.
4916    
4917        If the entry is a response to multiple resources,
4918        additional <XE::thr|in-reply-to> element <kwd:MAY>
4919        be used.
4920    
4921        RFC 4685 assigns no significance to the order in which
4922        multiple <XE::thr|in-reply-to> element appear within
4923        an entry.
4924    
4925      @Test:
4926        @@QName: AtomThreadInReplyToElement.1.test
4927        @@PerlDef:
4928          my $doc;
4929          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4930    
4931          my $el = $doc->create_element_ns (<Q::thr|>, 'in-reply-to');
4932    
4933          $test->id ('interface');
4934          $test->assert_isa ($el, <IFName::AtomThreadInReplyToElement>);
4935    
4936          $test->id ('feature');
4937          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4938    
4939      @ATTR:
4940        @@Name: ref
4941        @@enDesc:
4942          The <XA::ref> attribute of the element.
4943    
4944          It <kwd:MUST> <I::reflect the URI value
4945          of the <XA::ref> attribute> of the node.
4946    
4947          The <XA::ref> attribute specifies the persistent,
4948          universally unique identifier of the resource being
4949          responded to.  The value <kwd:MUST> conform to
4950          the same construction and comparison rules as the
4951          value of the <XE::atom|id> element.  Though the IRI
4952          might use a dereferenceable scheme, processors <kwd:MUST-NOT>
4953          assume that it can be dereferenced.
4954    
4955          The <XE::thr|in-reply-to> element <kwd:MUST> contain
4956          a <XA::ref> attribute identifying the resource that
4957          is being respnoded to.
4958    
4959          If the resource being responded to does not have a persistent,
4960          universally unique identifier, the publisher <kwd:MUST> assign an
4961          identifier that satisfies all the considerations in Section 4.2.6 of
4962          RFC 4287 for use as the value of the <XA::ref> attribute.
4963          In that case, if a representation of the resource can be retrieved
4964          from an IRI that can be used as a valid atom:id value, then this IRI
4965          <kwd:SHOULD> be used as the value of both the <XA::ref> and
4966          <XA::href> attributes.
4967        @@Type: DOMString
4968        @@actualType: DOMURI
4969        @@Get:
4970          @@@nullCase:
4971            @@@@enDesc:
4972              If the algorithm returns <DOM::null>.
4973          @@@PerlDef:
4974            __CODE{getReflectAttrURIValue::
4975              $node => $self,
4976              $namespaceURI => {null},
4977              $localName => 'ref',
4978              $r => $r,
4979              $defaultValue => {null},
4980            }__;
4981        @@Set:
4982          @@@nullCase:
4983            @@@@enDesc:
4984              Removes the attribute.
4985          @@@NodeReadOnlyError:
4986          @@@PerlDef:
4987            __CODE{setReflectAttrURIValue::
4988              $node => $self,
4989              $namespaceURI => {null},
4990              $localName => 'ref',
4991              $given => $given,
4992            }__;
4993            
4994      @ATTR:
4995        @@Name: source
4996        @@enDesc:
4997          The <XA::source> attribute of the element.
4998    
4999          It <kwd:MUST> <I::reflect the URI value
5000          of the <XA::source> attribute> of the node.
5001    
5002          The <XA::source> attribute <kwd:MAY> be used to specify the IRI
5003          of an Atom Feed or Entry Document containing an
5004          <XE::atom|entry> with an <XE::atom|id> value equal to the
5005          value of the <XA::ref> attribute.  The IRI specified <kwd:MUST>
5006          be dereferenceable.
5007        @@Type: DOMString
5008        @@actualType: DOMURI
5009        @@Get:
5010          @@@nullCase:
5011            @@@@enDesc:
5012              If the algorithm returns <DOM::null>.
5013          @@@PerlDef:
5014            __CODE{getReflectAttrURIValue::
5015              $node => $self,
5016              $namespaceURI => {null},
5017              $localName => 'source',
5018              $r => $r,
5019              $defaultValue => {null},
5020            }__;
5021        @@Set:
5022          @@@nullCase:
5023            @@@@enDesc:
5024              Removes the attribute.
5025          @@@NodeReadOnlyError:
5026          @@@PerlDef:
5027            __CODE{setReflectAttrURIValue::
5028              $node => $self,
5029              $namespaceURI => {null},
5030              $localName => 'source',
5031              $given => $given,
5032            }__;
5033            
5034      @ATTR:
5035        @@Name: href
5036        @@enDesc:
5037          The <XA::href> attribute of the element.
5038    
5039          It <kwd:MUST> <I::reflect the URI value
5040          of the <XA::href> attribute> of the node.
5041    
5042          The <XA::href> attribute specifies an IRI that may be used
5043          to retrieve a representation of the resource being
5044          responded to.  The IRI specified <kwd:MUST> be
5045          dereferenceable.
5046        @@Type: DOMString
5047        @@actualType: DOMURI
5048        @@Get:
5049          @@@nullCase:
5050            @@@@enDesc:
5051              If the algorithm returns <DOM::null>.
5052          @@@PerlDef:
5053            __CODE{getReflectAttrURIValue::
5054              $node => $self,
5055              $namespaceURI => {null},
5056              $localName => 'href',
5057              $r => $r,
5058              $defaultValue => {null},
5059            }__;
5060        @@Set:
5061          @@@nullCase:
5062            @@@@enDesc:
5063              Removes the attribute.
5064          @@@NodeReadOnlyError:
5065          @@@PerlDef:
5066            __CODE{setReflectAttrURIValue::
5067              $node => $self,
5068              $namespaceURI => {null},
5069              $localName => 'href',
5070              $given => $given,
5071            }__;
5072      
5073      @ATTR:
5074        @@Name: type
5075        @@enDesc:
5076          The <XA::type> attribute of the element.
5077    
5078          It <kwd:MUST> <I::reflect the string value
5079          of the <XA::type> attribute> of the node.
5080    
5081          The <XA::type> attribute <kwd:MAY> be used to provide
5082          a hint to the client about the media type of the
5083          resource identified by the <XA::href> attribute.
5084          The <XA::type> attribute is only meaningful if a
5085          corresponding <XA::href> attribute is also provided.
5086        @@Type: DOMString
5087        @@Get:
5088          @@@nullCase:
5089            @@@@enDesc:
5090              If the algorithm returns <DOM::null>.
5091          @@@PerlDef:
5092            __CODE{getReflectAttrStringValue::
5093              $node => $self,
5094              $namespaceURI => {null},
5095              $localName => 'type',
5096              $r => $r,
5097              $defaultValue => {null},
5098            }__;
5099        @@Set:
5100          @@@nullCase:
5101            @@@@enDesc:
5102              Removes the attribute.
5103          @@@NodeReadOnlyError:
5104          @@@PerlDef:
5105            __CODE{setReflectAttrStringValue::
5106              $node => $self,
5107              $namespaceURI => {null},
5108              $localName => 'type',
5109              $given => $given,
5110            }__;
5111    ##AtomThreadInReplyToElement
5112    
5113    IFClsDef:
5114      @IFQName: AtomLinkElementThread
5115      @ClsQName: ManakaiAtomLinkElementThread
5116    
5117      @ClsISA: ManakaiAtomLinkElement
5118    
5119      @f:implements: AtomThreadingFeature10
5120    
5121      @enDesc:
5122        An <XE::atom|link> element with a <XA::rel> attribute value of
5123        <XML::replies> may be used to reference a resource where responses
5124        to an entry may be found.  If the <XA::type> attribute of the
5125        <XE::atom|link> is omitted, its value is assumed to be
5126        <XML::application/atom+xml>.
5127    
5128        A <XML::replies> link appearing as a child of the <XE::atom|feed>
5129        or <XE::atom|source> element indicates that the referenced
5130        resource likely contains responses to any of that
5131        feed's entries.  A <XML::replies>
5132        link appearing as a child of an <XE::atom|entry> element
5133        indicates that the linked resource likely contains responses
5134        specific to that entry.
5135    
5136        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
5137        is supported, any <IF::Element> whose element type
5138        is <XE::atom|link> <kwd:MUST> implement the <IF::AtomLinkElementThread>
5139        interface in addition to other appropriate interfaces.
5140    
5141      @Test:
5142        @@QName: AtomLinkElementThread.1.test
5143        @@PerlDef:
5144          my $doc;
5145          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5146    
5147          my $el = $doc->create_element_ns (<Q::atom|>, 'link');
5148    
5149          $test->id ('interface');
5150          $test->assert_isa ($el, <IFName::AtomLinkElementThread>);
5151    
5152          $test->id ('feature');
5153          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
5154    
5155      @ATTR:
5156        @@Name: threadCount
5157        @@enDesc:
5158          The <XA::thr|count> attribute of the element.
5159    
5160          It <kwd:MUST> <I::reflect the non-negative integer value
5161          of the <XA::thr|count> attribute> of the node.
5162    
5163          An <XE::atom|link> element using the <XML::replies>
5164          <XA::rel> attribute value <kwd:MAY> contain
5165          a <XA::thr|count> attribute whose value is a
5166          non-negative integer that provides a hint to clients
5167          as to the total number of replies contained by the
5168          linked resource.  The value is advisory and
5169          may not accurately reflect the actual number of replies.
5170        @@Type: idl|long||ManakaiDOM|all
5171        @@Get:
5172          @@@PerlDef:
5173            __CODE{getReflectAttrNonNegativeIntegerValue::
5174              $node => $self,
5175              $namespaceURI => {<Q::thr|>},
5176              $localName => 'count',
5177              $r => $r,
5178              $defaultValue => {null},
5179            }__;
5180        @@Set:
5181          @@@NodeReadOnlyError:
5182          @@@PerlDef:
5183            __CODE{setReflectAttrNonNegativeIntegerValue::
5184              $node => $self,
5185              $namespaceURI => {<Q::thr|>},
5186              $localName => 'count',
5187              $given => $given,
5188            }__;
5189    
5190        @@Test:
5191          @@@QName: AtomLinkElementThread.threadCount.1.test
5192          @@@PerlDef:
5193            my $doc;
5194            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5195    
5196            my $link = $doc->create_element_ns (<Q::atom|>, 'link');
5197    
5198            $test->id ('default');
5199            $test->assert_num_equals
5200                     (expected_value => -1,
5201                      actual_value =>
5202                        $link-><AG::AtomLinkElementThread.threadCount>);
5203    
5204            $test->id ('zero');
5205            $link-><AS::AtomLinkElementThread.threadCount> (0);
5206            $test->assert_num_equals
5207                     (expected_value => 0,
5208                      actual_value =>
5209                        $link-><AG::AtomLinkElementThread.threadCount>);
5210            $test->id ('zero.attr');
5211            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '0');
5212    
5213            $test->id ('one');
5214            $link-><AS::AtomLinkElementThread.threadCount> (1);
5215            $test->assert_num_equals
5216                     (expected_value => 1,
5217                      actual_value =>
5218                        $link-><AG::AtomLinkElementThread.threadCount>);
5219            $test->id ('one.attr');
5220            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '1');
5221    
5222            $test->id ('10000');
5223            $link-><AS::AtomLinkElementThread.threadCount> (10000);
5224            $test->assert_num_equals
5225                     (expected_value => 10000,
5226                      actual_value =>
5227                        $link-><AG::AtomLinkElementThread.threadCount>);
5228            $test->id ('10000.attr');
5229            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'),
5230                                  '10000');
5231    
5232            $test->id ('+10000');
5233            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '+10000');
5234            $test->assert_num_equals
5235                     (expected_value => 10000,
5236                      actual_value =>
5237                        $link-><AG::AtomLinkElementThread.threadCount>);
5238    
5239            $test->id ('010000');
5240            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '010000');
5241            $test->assert_num_equals
5242                     (expected_value => 10000,
5243                      actual_value =>
5244                        $link-><AG::AtomLinkElementThread.threadCount>);
5245    
5246            $test->id ('-100');
5247            $link-><AS::AtomLinkElementThread.threadCount> (-100);
5248            $test->assert_num_equals
5249                     (expected_value => -1,
5250                      actual_value =>
5251                        $link-><AG::AtomLinkElementThread.threadCount>);
5252            $test->id ('-100.attr');
5253            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5254    
5255            $test->id ('120a');
5256            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '120a');
5257            $test->assert_num_equals
5258                     (expected_value => -1,
5259                      actual_value =>
5260                        $link-><AG::AtomLinkElementThread.threadCount>);
5261    
5262            $test->id ('-1');
5263            $link-><AS::AtomLinkElementThread.threadCount> (-1);
5264            $test->assert_num_equals
5265                     (expected_value => -1,
5266                      actual_value =>
5267                        $link-><AG::AtomLinkElementThread.threadCount>);
5268            $test->id ('-1.attr');
5269            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5270    
5271      @enImplNote:
5272        @@ddid: updated
5273        @@@:
5274          {TODO::
5275            <XA::thr|updated> attribute
5276          }
5277    ##AtomLinkElementThread
5278    
5279    enImplNote:
5280      @@ddid: total
5281      @@@:
5282        {TODO::
5283          <XE::thr|total>
5284        }
5285    
5286    enImplNote:
5287      @@ddid: threaddtd
5288      @@@:
5289        {TODO::
5290          DTD impl for threading
5291        }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.22

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24