/[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.24 by wakaba, Sat Dec 30 13:25:34 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
452    @AliasFor: idl|boolean||ManakaiDOM|all    @AliasFor: idl|boolean
453    
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 519  ElementTypeBinding: Line 487  ElementTypeBinding:
487      @@Value:      @@Value:
488        @@@@: 1        @@@@: 1
489        @@@ContentType: DISCore|Boolean        @@@ContentType: DISCore|Boolean
490      @@Type: idl|boolean||ManakaiDOM|all      @@Type: idl|boolean
491    
492  ElementTypeBinding:  ElementTypeBinding:
493    @Name: FalseCase    @Name: FalseCase
# Line 531  ElementTypeBinding: Line 499  ElementTypeBinding:
499      @@Value:      @@Value:
500        @@@@: 0        @@@@: 0
501        @@@ContentType: DISCore|Boolean        @@@ContentType: DISCore|Boolean
502      @@Type: idl|boolean||ManakaiDOM|all      @@Type: idl|boolean
503    
504  ## -- Features  ## -- Features
505    
# Line 541  ElementTypeBinding: Line 509  ElementTypeBinding:
509      dis:ResourceDef      dis:ResourceDef
510    @ShadowContent:    @ShadowContent:
511      @@DISCore:resourceType: f|Feature      @@DISCore:resourceType: f|Feature
     @@For: =ManakaiDOM|all  
512    
513  ElementTypeBinding:  ElementTypeBinding:
514    @Name: FeatureVerDef    @Name: FeatureVerDef
# Line 562  FeatureDef: Line 529  FeatureDef:
529    @QName: AtomFeature    @QName: AtomFeature
530    @FeatureVerDef:    @FeatureVerDef:
531      @@QName: AtomFeature10      @@QName: AtomFeature10
532      @@Version: 1.0      @@f:version: 1.0
533      @@f:instanceOf: AtomFeature      @@f:instanceOf: AtomFeature
534      @@f:requires: tx|XMLFeature30      @@f:requires: tx|XMLFeature30
535      @@enDesc:      @@enDesc:
536        The Atom DOM, version 1.0.        The Atom DOM, version 1.0.
537    
538    FeatureDef:
539      @featureQName: fe|AtomThreading
540      @QName: AtomThreadingFeature
541      @FeatureVerDef:
542        @@QName: AtomThreadingFeature10
543        @@f:version: 1.0
544        @@f:instanceOf: AtomThreadingFeature
545        @@f:requires: fe|AtomFeature10
546        @@enDesc:
547          The Atom Threading Extension DOM, version 1.0.
548    
549  ## -- Modules  ## -- Modules
550    
551  ModuleSetDef:  ModuleSetDef:
# Line 658  ResourceDef: Line 636  ResourceDef:
636    @QName: AtomQName    @QName: AtomQName
637    @enLN: Qualified Names    @enLN: Qualified Names
638    @mv:id: qname    @mv:id: qname
   @For: =ManakaiDOM|ManakaiDOMLatest  
639    @DISCore:resourceType: mv|XMLDTDQNameModule    @DISCore:resourceType: mv|XMLDTDQNameModule
640    
641    @mv:contains: Atom    @mv:contains: Atom
# Line 667  ResourceDef: Line 644  ResourceDef:
644    @QName: Atom10    @QName: Atom10
645    @enLN: Atom 1.0    @enLN: Atom 1.0
646    @mv:id: atom10    @mv:id: atom10
   @For: =ManakaiDOM|ManakaiDOMLatest  
647    @DISCore:resourceType: mv|XMLDTDDriver    @DISCore:resourceType: mv|XMLDTDDriver
648    
649    @mv:refers: Atom    @mv:refers: Atom
# Line 684  ElementTypeBinding: Line 660  ElementTypeBinding:
660      dis:ResourceDef      dis:ResourceDef
661    @ShadowContent:    @ShadowContent:
662      @@DISCore:resourceType: mv|XMLDTDModuleSet      @@DISCore:resourceType: mv|XMLDTDModuleSet
     @@For: =ManakaiDOM|ManakaiDOMLatest  
663    
664  ElementTypeBinding:  ElementTypeBinding:
665    @Name: ModuleDef    @Name: ModuleDef
# Line 692  ElementTypeBinding: Line 667  ElementTypeBinding:
667      dis:ResourceDef      dis:ResourceDef
668    @ShadowContent:    @ShadowContent:
669      @@DISCore:resourceType: mv|XMLDTDModule      @@DISCore:resourceType: mv|XMLDTDModule
     @@For: =ManakaiDOM|ManakaiDOMLatest  
670    
671  ## -- Implementation  ## -- Implementation
672    
# Line 700  IFClsDef: Line 674  IFClsDef:
674    @IFQName: AtomImplementation    @IFQName: AtomImplementation
675    @ClsQName: ManakaiAtomImplementation    @ClsQName: ManakaiAtomImplementation
676    
677    @IFISA: c|DOMImplementation    @domperl:implementedByObjectsOf: c|DOMImplementation
678    @ClsISA: c|ManakaiDOMImplementation    @domperl:classImplementedByObjectsOf: c|ManakaiDOMImplementation
679    
680    @enDesc:    @enDesc:
681      The <IF::AtomImplementation> interface provides convenience      The <IF::AtomImplementation> interface provides convenience
682      methods to create Atom documents.      methods to create Atom documents.
683    
684    @f:provides: AtomFeature10    @f:implements: AtomFeature10
685    
686    @Test:    @Test:
687      @@QName: AtomImplementation.interface.test      @@QName: AtomImplementation.interface.test
688      @@PerlDef:      @@PerlDef:
689        for my $interface (        for my $interface (
690          <IFName::AtomImplementation>,          <IFName::AtomImplementation>,
         <IFName::AtomImplementation||ManakaiDOM|ManakaiDOM>,  
691          <IFName::c|DOMImplementation>,          <IFName::c|DOMImplementation>,
         <IFName::urigen|URIImplementation>,  
         <IFName::f|MinimumImplementation>,  
692          <IFName::f|GetFeature>,          <IFName::f|GetFeature>,
693        ) {        ) {
694          $test->id ($interface);          $test->id ($interface);
695          $test->assert_true          $test->assert_true
696                   (<Class::ManakaiAtomImplementation>->isa ($interface));                   (<Class::c|ManakaiDOMImplementation>->isa ($interface));
697        }        }
698    @Test:    @Test:
699      @@QName: ImplementationRegistry.AtomImplementation.1.test      @@QName: ImplementationRegistry.AtomImplementation.1.test
700      @@PerlDef:      @@PerlDef:
701        require Message::Markup::Atom;        require Message::Markup::Atom;
702        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
703                     ->get_implementation ({                     ->get_dom_implementation ({
704                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
705                       });                       });
706    
# Line 739  IFClsDef: Line 710  IFClsDef:
710      @@PerlDef:      @@PerlDef:
711        require Message::Markup::Atom;        require Message::Markup::Atom;
712        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
713                     ->get_implementation ({                     ->get_dom_implementation ({
714                         Core => '3.0',                         Core => '3.0',
715                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
716                       });                       });
# Line 750  IFClsDef: Line 721  IFClsDef:
721      @@PerlDef:      @@PerlDef:
722        require Message::Markup::Atom;        require Message::Markup::Atom;
723        my $impl = $Message::DOM::ImplementationRegistry        my $impl = $Message::DOM::ImplementationRegistry
724                     ->get_implementation ({                     ->get_dom_implementation ({
725                         XML => '3.0',                         XML => '3.0',
726                         <Q::fe|Atom> => '1.0',                         <Q::fe|Atom> => '1.0',
727                       });                       });
# Line 786  IFClsDef: Line 757  IFClsDef:
757            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
758            as if an empty string is specified.            as if an empty string is specified.
759      @@Return:      @@Return:
760        @@@Type: AtomFeedDocument        @@@Type: AtomDocument
761        @@@enDesc:        @@@enDesc:
762          The newly created Atom Feed Document.          The newly created Atom Feed Document.
763    
# Line 969  IFClsDef: Line 940  IFClsDef:
940            The implementation <kwd:MUST> treate <DOM::null>            The implementation <kwd:MUST> treate <DOM::null>
941            as if an empty string is specified.            as if an empty string is specified.
942      @@Return:      @@Return:
943        @@@Type: AtomEntryDocument        @@@Type: AtomDocument
944        @@@enDesc:        @@@enDesc:
945          The newly created Atom Entry Document.          The newly created Atom Entry Document.
946    
# Line 1512  IFClsDef: Line 1483  IFClsDef:
1483          <QUOTE::reflecting Date child element> attribute should          <QUOTE::reflecting Date child element> attribute should
1484          be provided for published and created?          be provided for published and created?
1485        }        }
 ##AtomImplementation  
1486    
1487  IFClsDef:    @CODE:
1488    @IFQName: AtomDocument      @@QName: getReflectAttrNonNegativeIntegerValue
1489    @ClsQName: ManakaiAtomDocument      @@enDesc:
1490          {P:: If a DOM attribute is defined to <DFN::reflect the
1491               non-negative integer value of the <VAR::attr-name> attribute>
1492               of the node <VAR::E>, the getter of the attribute <kwd:MUST>
1493               return the value defined by the algorithm:
1494    
1495            {OLI:: If the <VAR::E> contains an attribute node <VAR::A> whose name
1496                   is <VAR::attr-name>:
1497    
1498              = If the <A::Node.nodeValue> of the <VAR::A> is
1499                one or more sequence of digits (<CHAR::DIGIT ZERO>,
1500                <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>) optionally
1501                preceding by a <CHAR::PLUS SIGN>, then
1502                the attribute getter <kwd:MUST> return a value
1503                by interpreting the <A::Node.nodeValue> of the <VAR::A>
1504                as a decimal number.
1505    
1506    @IFISA: Document          }
   @ClsISA: td|ManakaiDOMDocument  
1507    
1508    @s:rootElementType: AnyAtomElement||ManakaiDOM|all          = If a default value is explicitly defined
1509              where this algorithm is referenced, it <kwd:MUST>
1510              return the default value.
1511    
1512    @enDesc:          = Otherwise, it <kwd:MUST> return a binding-specific
1513      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>            default value, if it is defined by the specification
1514      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.  
1515    
1516    @Test:        }
     @@QName: createDocument.AtomDocument.test  
     @@PerlDef:  
       my $impl;  
       __CODE{tc|createImplForTest:: $impl => $impl}__;  
       
       my $doc = $impl-><M::c|DOMImplementation.createDocument>  
                          (<Q::atom|>, 'unknown');  
1517    
1518        $test->id ('interface');          {NOTE::
1519        $test->assert_isa ($doc, <IFName::AtomDocument>);            In Atom Threading Extension <SRC::RFC 4685>,
1520  ##AtomDocument            the <CHAR::PLUS SIGN> and leading <CHAR::DIGIT ZERO>s
1521              are prohibitted.
1522            }
1523        @@PerlDef:
1524          __DEEP{
1525            E: {
1526              $r = $node-><M::Element.getAttributeNS> ($namespaceURI, $localName);
1527              if (defined $r) {
1528                if ($r =~ /\A\+?([0-9]+)\z/) {
1529                  $r = 0+$1;
1530                  last E;
1531                }
1532              }
1533    
1534  IFClsDef:            $r = $defaultValue;
1535    @IFQName: AtomFeedDocument            $r = -1 unless defined $r;
1536    @ClsQName: ManakaiFeedEntryDocument          } # E
1537          }__;
1538    
1539    @IFISA: AtomDocument    @CODE:
1540    @ClsISA: ManakaiAtomDocument      @@QName: setReflectAttrNonNegativeIntegerValue
1541        @@enDesc:
1542          {P:: If a DOM attribute is defined to <DFN::reflect the
1543               non-negative integer value
1544               of the <VAR::attr-name> attribute> of the node <VAR::E>,
1545               the setter of the attribute <kwd:MUST> modify the node as
1546               defined by the algorithm:
1547    
1548    @s:rootElementType:          = If the given value is <DOM::-1> or one of binding-specific
1549      @@@: atom|feed            default values, if any, as defined by the specification
1550      @@DISCore:stopISARecursive: 1            of the binding, it <kwd:MUST>
1551              remove the <VAR::attr-name> attribute node, if any,
1552              from the list of attribute nodes of <VAR::E>.
1553    
1554    @enDesc:          = Otherwise, it <kwd:MUST> set the <VAR::attr-name>
1555      The <IF::AtomFeedDocument> interface provides convenience            attribute node value to a string representation
1556      methods and attributes for an Atom            of the given value as if
1557      Feed Document, i.e. representation of an Atom feed.            the <M::Element.setAttributeNS> method were invoked.
1558              The string representation <kwd:MUST> be a decimal
1559              number consist of one or more sequence of digits
1560              (<CHAR::DIGIT ZERO>, <CHAR::DIGIT ONE>, ..., <CHAR::DIGIT NINE>)
1561              <EM::without> any leading <CHAR::DIGIT ZERO>.
1562              The <CHAR::PLUS SIGN> <kwd:MUST> be omitted.
1563    
1564      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.  
1565    
1566    @Test:          {NOTE::
1567      @@QName: createDocument.AtomFeedDocument.test            It might throw an exception.
1568            }
1569      @@PerlDef:      @@PerlDef:
1570        my $impl;        __DEEP{
1571        __CODE{tc|createImplForTest:: $impl => $impl}__;          if (defined $given and $given >= 0) {
1572                  $node-><M::Element.setAttributeNS>
1573        my $doc = $impl-><M::c|DOMImplementation.createDocument>                     ($namespaceURI, $localName, 0+$given);
1574                           (<Q::atom|>, 'feed');          } else {
1575              $node-><M::Element.removeAttributeNS> ($namespaceURI, $localName);
1576        $test->id ('interface');          }
1577        $test->assert_isa ($doc, <IFName::AtomFeedDocument>);        }__;
1578  ##AtomFeedDocument  ##AtomImplementation
1579    
1580  IFClsDef:  IFClsDef:
1581    @IFQName: AtomEntryDocument    @IFQName: AtomDocument
1582    @ClsQName: ManakaiAtomEntryDocument    @ClsQName: ManakaiAtomDocument
1583    
1584    @IFISA: AtomDocument    @domperl:implementedByObjectsOf: Document
1585    @ClsISA: ManakaiAtomDocument    @domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument
1586    
1587    @s:rootElementType:    @f:implements: AtomFeature10
     @@@: atom|entry  
     @@DISCore:stopISARecursive: 1  
1588    
1589    @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.  
   
1590      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>      If the <Feature::fe|Atom> feature version <FeatureVer::1.0>
1591      is supported, a <IF::Document> object whose <A::Document.documentElement>'s      is supported, a <IF::Document> object whose <A::Document.documentElement>'s
1592      element type, if any, is <XE::atom|entry> at least at      <A::Node.namespaceURI>, if any, is <URI^^DISCore|QName::atom|> at least
1593      the time of the creation <kwd:MUST> also      at the time of creation <kwd:MUST> also
1594      implement the <IF::AtomEntryDocument> interface.  Other      implement the <IF::AtomDocument> interface.  Other
1595      <IF::Document> objects <kwd:MAY> also implement      <IF:Document> objects <kwd:MAY> also implement
1596      the <IF::AtomEntryDocument> interface.      the <IF::AtomDocument> interface.
1597    
1598    @Test:    @Test:
1599      @@QName: createDocument.AtomEntryDocument.test      @@QName: createDocument.AtomDocument.test
1600      @@PerlDef:      @@PerlDef:
1601        my $impl;        my $impl;
1602        __CODE{tc|createImplForTest:: $impl => $impl}__;        __CODE{tc|createImplForTest:: $impl => $impl}__;
1603            
1604        my $doc = $impl-><M::c|DOMImplementation.createDocument>        my $doc = $impl-><M::c|DOMImplementation.createDocument>
1605                           (<Q::atom|>, 'entry');                           (<Q::atom|>, 'unknown');
1606    
1607        $test->id ('interface');        $test->id ('interface');
1608        $test->assert_isa ($doc, <IFName::AtomEntryDocument>);        $test->assert_isa ($doc, <IFName::AtomDocument>);
1609  ##AtomEntryDocument  ##AtomDocument
1610    
1611  AGDef:  AGDef:
1612    @QName: atomCommonAttributes    @QName: atomCommonAttributes
# Line 1663  STDef: Line 1651  STDef:
1651  STCDef:  STCDef:
1652    @QName: atomUriCM    @QName: atomUriCM
1653    @mv:elementContentModelName: URI    @mv:elementContentModelName: URI
1654    @cm: (dxm|PCDATA||ManakaiDOM|all)*    @cm: (dxm|PCDATA)*
1655    
1656  STDef:  STDef:
1657    @QName: atomEmailAddress    @QName: atomEmailAddress
# Line 1673  STDef: Line 1661  STDef:
1661  STCDef:  STCDef:
1662    @QName: atomEmailAddressCM    @QName: atomEmailAddressCM
1663    @mv:elementContentModelName: EmailAddress    @mv:elementContentModelName: EmailAddress
1664    @cm: (dxm|PCDATA||ManakaiDOM|all)*    @cm: (dxm|PCDATA)*
1665    
1666  ElementTypeBinding:  ElementTypeBinding:
1667    @Name: AGDef    @Name: AGDef
# Line 1681  ElementTypeBinding: Line 1669  ElementTypeBinding:
1669      dis:ResourceDef      dis:ResourceDef
1670    @ShadowContent:    @ShadowContent:
1671      @@DISCore:resourceType: mv|AttributeTypeGroup      @@DISCore:resourceType: mv|AttributeTypeGroup
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1672    
1673  ElementTypeBinding:  ElementTypeBinding:
1674    @Name: ATDef    @Name: ATDef
# Line 1689  ElementTypeBinding: Line 1676  ElementTypeBinding:
1676      dis:ResourceDef      dis:ResourceDef
1677    @ShadowContent:    @ShadowContent:
1678      @@DISCore:resourceType: mv|AttributeType      @@DISCore:resourceType: mv|AttributeType
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1679    
1680  ElementTypeBinding:  ElementTypeBinding:
1681    @Name: ECDef    @Name: ECDef
# Line 1697  ElementTypeBinding: Line 1683  ElementTypeBinding:
1683      dis:ResourceDef      dis:ResourceDef
1684    @ShadowContent:    @ShadowContent:
1685      @@DISCore:resourceType: mv|ElementTypeClass      @@DISCore:resourceType: mv|ElementTypeClass
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1686    
1687  ElementTypeBinding:  ElementTypeBinding:
1688    @Name: EMDef    @Name: EMDef
# Line 1705  ElementTypeBinding: Line 1690  ElementTypeBinding:
1690      dis:ResourceDef      dis:ResourceDef
1691    @ShadowContent:    @ShadowContent:
1692      @@DISCore:resourceType: mv|ElementTypeClassMix      @@DISCore:resourceType: mv|ElementTypeClassMix
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1693    
1694  ElementTypeBinding:  ElementTypeBinding:
1695    @Name: STDef    @Name: STDef
# Line 1713  ElementTypeBinding: Line 1697  ElementTypeBinding:
1697      dis:ResourceDef      dis:ResourceDef
1698    @ShadowContent:    @ShadowContent:
1699      @@DISCore:resourceType: mv|XMLDTDDatatypeEntity      @@DISCore:resourceType: mv|XMLDTDDatatypeEntity
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1700    
1701  ElementTypeBinding:  ElementTypeBinding:
1702    @Name: STCDef    @Name: STCDef
# Line 1721  ElementTypeBinding: Line 1704  ElementTypeBinding:
1704      dis:ResourceDef      dis:ResourceDef
1705    @ShadowContent:    @ShadowContent:
1706      @@DISCore:resourceType: mv|ElementContentModel      @@DISCore:resourceType: mv|ElementContentModel
     @@For: =ManakaiDOM|ManakaiDOMLatest  
1707    
1708  IFClsDef:  IFClsDef:
1709    @IFQName: AtomElement    @IFQName: AtomElement
# Line 1730  IFClsDef: Line 1712  IFClsDef:
1712    @IFISA: Element    @IFISA: Element
1713    @ClsISA: te|ManakaiDOMElement    @ClsISA: te|ManakaiDOMElement
1714        
1715    @s:elementType: AnyAtomElement||ManakaiDOM|all    @f:implements: AtomFeature10
1716      @s:elementType: AnyAtomElement
1717    
1718    @enDesc:    @enDesc:
1719      The <IF::AtomElement> interface provides convenience      The <IF::AtomElement> interface provides convenience
# Line 1755  IFClsDef: Line 1738  IFClsDef:
1738      @@PerlDef:      @@PerlDef:
1739        for my $interface (        for my $interface (
1740          <IFName::AtomElement>,          <IFName::AtomElement>,
         <IFName::AtomElement||ManakaiDOM|ManakaiDOM>,  
1741          <IFName::Element>,          <IFName::Element>,
1742          <IFName::Node>,          <IFName::Node>,
1743          <IFName::f|GetFeature>,          <IFName::f|GetFeature>,
# Line 1799  IFClsConstructDef: Line 1781  IFClsConstructDef:
1781    @IFISA: AtomElement    @IFISA: AtomElement
1782    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1783    
1784      @f:implements: AtomFeature10
1785    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1786    
1787    @cm:    @cm:
1788      dxm|ANY||ManakaiDOM|all      dxm|ANY
1789    @enImplNote:    @enImplNote:
1790      @@ddid:cm      @@ddid:cm
1791      @@@:      @@@:
1792        {TODO::        {TODO::
1793          (dxm|PCDATA||ManakaiDOM|all | html|div)*          (dxm|PCDATA | html|div)*
1794        }        }
1795    
1796    @enDesc:    @enDesc:
# Line 1940  IFClsConstructDef: Line 1923  IFClsConstructDef:
1923    @IFISA: AtomElement    @IFISA: AtomElement
1924    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
1925    
1926      @f:implements: AtomFeature10
1927    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
1928    
1929    @cm:    @cm:
# Line 2096  IFClsConstructDef: Line 2080  IFClsConstructDef:
2080    @IFISA: AtomElement    @IFISA: AtomElement
2081    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2082    
2083      @f:implements: AtomFeature10
2084    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2085    
2086    @cm:    @cm:
2087      (dxm|PCDATA||ManakaiDOM|all)*      (dxm|PCDATA)*
2088    @enImplNote:    @enImplNote:
2089      @@ddid: cm      @@ddid: cm
2090      @@@:      @@@:
# Line 2203  IFClsETDef: Line 2188  IFClsETDef:
2188    @IFISA: AtomElement    @IFISA: AtomElement
2189    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2190    
2191      @f:implements: AtomFeature10
2192    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2193    
2194    @cm:    @cm:
# Line 2926  IFClsETDef: Line 2912  IFClsETDef:
2912    @IFISA: AtomElement    @IFISA: AtomElement
2913    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
2914    
2915      @f:implements: AtomFeature10
2916    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
2917    
2918    @cm:    @cm:
# Line 3103  IFClsETDef: Line 3090  IFClsETDef:
3090          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);          $test->assert_num_equals (actual_value => 0+@$list, expected_value => 0);
3091    
3092          $test->id ('parent');          $test->id ('parent');
3093            my $parent;
3094          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3095              $parent = $_;
3096            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3097                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3098            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3123  IFClsETDef: Line 3112  IFClsETDef:
3112          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');          my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'entry');
3113    
3114          $test->id ('parent');          $test->id ('parent');
3115            my $parent;
3116          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {          for ($doc-><M::Document.createElementNS> (<Q::atom|>, 'feed')) {
3117              $parent = $_;
3118            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
3119                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));                  ($doc-><M::Document.createElementNS> (<Q::atom|>, 'author'));
3120            $_-><M::Node.appendChild>            $_-><M::Node.appendChild>
# Line 3459  IFClsETDef: Line 3450  IFClsETDef:
3450    @IFISA: AtomElement    @IFISA: AtomElement
3451    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3452    
3453      @f:implements: AtomFeature10
3454    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3455        
3456    @cm: atomUriCM    @cm: atomUriCM
# Line 3473  IFClsETDef: Line 3465  IFClsETDef:
3465    @IFISA: AtomElement    @IFISA: AtomElement
3466    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3467    
3468      @f:implements: AtomFeature10
3469    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3470    
3471    @cm: atomUriCM    @cm: atomUriCM
# Line 3487  IFClsETDef: Line 3480  IFClsETDef:
3480    @IFISA: AtomElement    @IFISA: AtomElement
3481    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3482    
3483      @f:implements: AtomFeature10
3484    # no common attribs    # no common attribs
3485    @cm: TextCM    @cm: TextCM
3486    
# Line 3502  IFClsETDef: Line 3496  IFClsETDef:
3496    @IFISA: AtomElement    @IFISA: AtomElement
3497    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3498    
3499      @f:implements: AtomFeature10
3500    # no common attribs    # no common attribs
3501    @cm: atomUriCM    @cm: atomUriCM
3502    
# Line 3517  IFClsETDef: Line 3512  IFClsETDef:
3512    @IFISA: AtomElement    @IFISA: AtomElement
3513    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3514    
3515      @f:implements: AtomFeature10
3516    # no common attribs    # no common attribs
3517    @cm: atomEmailAddressCM    @cm: atomEmailAddressCM
3518    
# Line 3532  IFClsETDef: Line 3528  IFClsETDef:
3528    @IFISA: AtomElement    @IFISA: AtomElement
3529    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3530    
3531      @f:implements: AtomFeature10
3532    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3533    
3534    @cm: atomUriCM    @cm: atomUriCM
# Line 3546  IFClsETDef: Line 3543  IFClsETDef:
3543    @IFISA: AtomElement    @IFISA: AtomElement
3544    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3545    
3546      @f:implements: AtomFeature10
3547    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3548    
3549    @cm:    @cm:
3550      dxm|ANY||ManakaiDOM|all      dxm|ANY
3551    
3552    @enDesc:    @enDesc:
3553      The <XE::atom|content> element either contains or links to      The <XE::atom|content> element either contains or links to
# Line 3799  IFClsETDef: Line 3797  IFClsETDef:
3797    
3798    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3799    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3800    
3801      @f:implements: AtomFeature10
3802    @mv:refers: PersonAG    @mv:refers: PersonAG
3803    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3804    
# Line 3816  IFClsETDef: Line 3816  IFClsETDef:
3816    @IFISA: AtomElement    @IFISA: AtomElement
3817    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3818    
3819      @f:implements: AtomFeature10
3820    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3821    
3822    @cm: undefinedContent    @cm: undefinedContent
# Line 3933  IFClsETDef: Line 3934  IFClsETDef:
3934    
3935    @IFISA: AtomPersonConstruct    @IFISA: AtomPersonConstruct
3936    @ClsISA: ManakaiAtomPersonConstruct    @ClsISA: ManakaiAtomPersonConstruct
3937    
3938      @f:implements: AtomFeature10
3939    @mv:refers: PersonAG    @mv:refers: PersonAG
3940    @mv:elementContentModel: PersonCM    @mv:elementContentModel: PersonCM
3941    
# Line 3951  IFClsETDef: Line 3954  IFClsETDef:
3954    @IFISA: AtomElement    @IFISA: AtomElement
3955    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
3956    
3957      @f:implements: AtomFeature10
3958    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
3959    
3960    @cm:    @cm:
3961      (dxm|PCDATA||ManakaiDOM|all)*      (dxm|PCDATA)*
3962    
3963    @enDesc:    @enDesc:
3964      The <XE::atom|generator> element identifies the agent used      The <XE::atom|generator> element identifies the agent used
# Line 4037  IFClsETDef: Line 4041  IFClsETDef:
4041    @IFISA: AtomElement    @IFISA: AtomElement
4042    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4043    
4044      @f:implements: AtomFeature10
4045    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4046    
4047    @cm: undefinedContent    @cm: undefinedContent
# Line 4172  IFClsETDef: Line 4177  IFClsETDef:
4177        of the <XA::type> attribute> of the node.        of the <XA::type> attribute> of the node.
4178      @@Type: DOMString      @@Type: DOMString
4179      @@Get:      @@Get:
4180          @@@enDesc:
4181            {P:: If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4182                 is supported, the attribute getter <kwd:MUST> return
4183                 the string <CODE::application/atom+xml> when both of the
4184                 following conditions are met:
4185    
4186               - The attribute getter would otherwise return <DOM::null>.
4187    
4188               - The <A::AtomLinkElement.rel> attribute contains
4189                 a string value of <URI^^DISCore|QName::rel|replies>.
4190    
4191            }
4192        @@@nullCase:        @@@nullCase:
4193          @@@@enDesc:          @@@@enDesc:
4194            If the algorithm returns <DOM::null>.            If the algorithm returns <DOM::null>.
# Line 4183  IFClsETDef: Line 4200  IFClsETDef:
4200            $r => $r,            $r => $r,
4201            $defaultValue => {null},            $defaultValue => {null},
4202          }__;          }__;
4203    
4204            unless (defined $r) {
4205              __DEEP{
4206                my $rel = $self-><AG::AtomLinkElement.rel>;
4207                if (defined $rel and $rel eq <Q::rel|replies>) {
4208                  $r = q<application/atom+xml>;
4209                }
4210              }__;
4211            }
4212      @@Set:      @@Set:
4213        @@@nullCase:        @@@nullCase:
4214          @@@@enDesc:          @@@@enDesc:
# Line 4196  IFClsETDef: Line 4222  IFClsETDef:
4222            $given => $given,            $given => $given,
4223          }__;          }__;
4224    
4225        @@Test:
4226          @@@QName: AtomLinkElement.type.!rel.test
4227          @@@PerlDef:
4228            my $doc;
4229            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4230    
4231            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4232    
4233            $test->id ('implied');
4234            my $type0 = $el-><AG::AtomLinkElement.type>;
4235            $test->assert_null ($type0);
4236    
4237            $test->id ('explicit');
4238            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4239            my $type1 = $el-><AG::AtomLinkElement.type>;
4240            $test->assert_equals ($type1, q<application/atom+xml>);
4241    
4242            $test->id ('different');
4243            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4244            my $type2 = $el-><AG::AtomLinkElement.type>;
4245            $test->assert_equals ($type2, q<application/xhtml+xml>);
4246        @@Test:
4247          @@@QName: AtomLinkElement.type.rel!=replies.test
4248          @@@PerlDef:
4249            my $doc;
4250            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4251    
4252            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4253    
4254            $el-><AS::AtomLinkElement.rel> (<Q::rel|alternate>);
4255    
4256            $test->id ('implied');
4257            my $type0 = $el-><AG::AtomLinkElement.type>;
4258            $test->assert_null ($type0);
4259    
4260            $test->id ('explicit');
4261            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4262            my $type1 = $el-><AG::AtomLinkElement.type>;
4263            $test->assert_equals ($type1, q<application/atom+xml>);
4264    
4265            $test->id ('different');
4266            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4267            my $type2 = $el-><AG::AtomLinkElement.type>;
4268            $test->assert_equals ($type2, q<application/xhtml+xml>);
4269        @@Test:
4270          @@@QName: AtomLinkElement.type.rel=replies.test
4271          @@@PerlDef:
4272            my $doc;
4273            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4274    
4275            my $el = $doc-><M::Document.createElementNS> (<Q::atom|>, 'link');
4276    
4277            $el-><AS::AtomLinkElement.rel> (<Q::rel|replies>);
4278    
4279            $test->id ('implied');
4280            my $type0 = $el-><AG::AtomLinkElement.type>;
4281            $test->assert_equals ($type0, q<application/atom+xml>);
4282    
4283            $test->id ('explicit');
4284            $el-><AS::AtomLinkElement.type> ('application/atom+xml');
4285            my $type1 = $el-><AG::AtomLinkElement.type>;
4286            $test->assert_equals ($type1, q<application/atom+xml>);
4287    
4288            $test->id ('different');
4289            $el-><AS::AtomLinkElement.type> ('application/xhtml+xml');
4290            my $type2 = $el-><AG::AtomLinkElement.type>;
4291            $test->assert_equals ($type2, q<application/xhtml+xml>);
4292    
4293    @ATTR:    @ATTR:
4294      @@Name: hreflang      @@Name: hreflang
4295      @@enDesc:      @@enDesc:
# Line 4304  IFClsETDef: Line 4398  IFClsETDef:
4398    
4399    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4400    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4401    
4402      @f:implements: AtomFeature10
4403    @mv:refers: DateAG    @mv:refers: DateAG
4404    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4405    
# Line 4324  IFClsETDef: Line 4420  IFClsETDef:
4420    
4421    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4422    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4423    
4424      @f:implements: AtomFeature10
4425    @mv:refers: TextAG    @mv:refers: TextAG
4426    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4427    
# Line 4359  IFClsETDef: Line 4457  IFClsETDef:
4457    @IFISA: AtomElement    @IFISA: AtomElement
4458    @ClsISA: ManakaiAtomElement    @ClsISA: ManakaiAtomElement
4459    
4460      @f:implements: AtomFeature10
4461    @mv:refers: atomCommonAttributes    @mv:refers: atomCommonAttributes
4462    
4463    @cm:    @cm:
# Line 4573  IFClsETDef: Line 4672  IFClsETDef:
4672    
4673    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4674    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4675    
4676      @f:implements: AtomFeature10
4677    @mv:refers: TextAG    @mv:refers: TextAG
4678    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4679    
# Line 4589  IFClsETDef: Line 4690  IFClsETDef:
4690    
4691    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4692    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4693    
4694      @f:implements: AtomFeature10
4695    @mv:refers: TextAG    @mv:refers: TextAG
4696    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4697    
# Line 4605  IFClsETDef: Line 4708  IFClsETDef:
4708    
4709    @IFISA: AtomTextConstruct    @IFISA: AtomTextConstruct
4710    @ClsISA: ManakaiAtomTextConstruct    @ClsISA: ManakaiAtomTextConstruct
4711    
4712      @f:implements: AtomFeature10
4713    @mv:refers: TextAG    @mv:refers: TextAG
4714    @mv:elementContentModel: TextCM    @mv:elementContentModel: TextCM
4715    
# Line 4621  IFClsETDef: Line 4726  IFClsETDef:
4726    
4727    @IFISA: AtomDateConstruct    @IFISA: AtomDateConstruct
4728    @ClsISA: ManakaiAtomDateConstruct    @ClsISA: ManakaiAtomDateConstruct
4729    
4730      @f:implements: AtomFeature10
4731    @mv:refers: DateAG    @mv:refers: DateAG
4732    @mv:elementContentModel: DateCM    @mv:elementContentModel: DateCM
4733    
# Line 4697  boolCParam: Line 4804  boolCParam:
4804  ResourceDef:  ResourceDef:
4805    @QName: CFG    @QName: CFG
4806    @AliasFor: c|DOMConfiguration    @AliasFor: c|DOMConfiguration
   @For: ManakaiDOM|DOM3  
4807    
4808  ElementTypeBinding:  ElementTypeBinding:
4809    @Name: boolCParam    @Name: boolCParam
# Line 4706  ElementTypeBinding: Line 4812  ElementTypeBinding:
4812    @ShadowContent:    @ShadowContent:
4813      @@DISCore:resourceType:      @@DISCore:resourceType:
4814        @@@@: c|DOMConfigurationParameter        @@@@: c|DOMConfigurationParameter
       @@@For: ManakaiDOM|DOM  
4815      @@DISCore:resourceType:      @@DISCore:resourceType:
4816        @@@@: DISCore|Property        @@@@: DISCore|Property
4817        @@@For: =ManakaiDOM|all      @@Type: idl|boolean
     @@For: ManakaiDOM|DOM3  
     @@For: =ManakaiDOM|all  
     @@Type: idl|boolean||ManakaiDOM|all  
4818    
4819  ECDef:  ECDef:
4820    @QName: simpleExtensionElements    @QName: simpleExtensionElements
# Line 4738  AGDef: Line 4840  AGDef:
4840  ResourceDef:  ResourceDef:
4841    @QName: undefinedContent    @QName: undefinedContent
4842    @mv:elementContentModelName: undefined    @mv:elementContentModelName: undefined
   @For: =ManakaiDOM|ManakaiDOMLatest  
4843    @DISCore:resourceType: mv|ElementContentModel    @DISCore:resourceType: mv|ElementContentModel
4844    @cm: dxm|ANY||ManakaiDOM|all    @cm: dxm|ANY
4845    @enImplNote:    @enImplNote:
4846      (text | anyForeignElement)*      (text | anyForeignElement)*
4847    
4848    ## -- Atom Threading Extension [RFC 4685]
4849    
4850    IFClsDef:
4851      @IFQName: AtomEntryElementThread
4852      @ClsQName: ManakaiAtomEntryElementThread
4853    
4854      @ClsISA: ManakaiAtomEntryElement
4855    
4856      @f:implements: AtomThreadingFeature10
4857    
4858      @enDesc:
4859        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
4860        is supported, any <IF::Element> whose element type
4861        is <XE::atom|entry> <kwd:MUST> implement the <IF::AtomEntryElementThread>
4862        interface in addition to other appropriate interfaces.
4863    
4864      @Test:
4865        @@QName: AtomEntryElementThread.1.test
4866        @@PerlDef:
4867          my $doc;
4868          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4869    
4870          my $el = $doc->create_element_ns (<Q::atom|>, 'entry');
4871    
4872          $test->id ('interface');
4873          $test->assert_isa ($el, <IFName::AtomEntryElementThread>);
4874    
4875          $test->id ('feature');
4876          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4877    
4878      @Attr:
4879        @@Name: threadInReplyToElements
4880        @@enDesc:
4881          A static list of <XE::thr|in-reply-to> child elements of the node.
4882        @@Type: StaticNodeList
4883        @@Get:
4884          @@@enDesc:
4885            It <kwd:MUST> <I::return a <XE::thr|in-reply-to> child element list>
4886            of the node.
4887          @@@PerlDef:
4888            __CODE{returnChildElementList::
4889              $node => $self,
4890              $namespaceURI => {<Q::thr|>},
4891              $localName => 'in-reply-to',
4892              $r => $r,
4893            }__;
4894    ##AtomEntryElementThread
4895    
4896    IFClsETDef:
4897      @IFQName: AtomThreadInReplyToElement
4898      @ETQName: thr|in-reply-to
4899      @ETRQName: thr|in-reply-to
4900      @ClsQName: ManakaiAtomThreadInReplyToElement
4901    
4902      @IFISA: AtomDateConstruct
4903      @ClsISA: ManakaiAtomDateConstruct
4904    
4905      @f:implements: AtomThreadingFeature10
4906      @mv:refers: atomCommonAttributes
4907    
4908      @cm: undefinedContent
4909    
4910      @enDesc:
4911        The <XE::thr|in-reply-to> element is used to indicate
4912        that an entry is a response to another resource.
4913    
4914        If the entry is a response to multiple resources,
4915        additional <XE::thr|in-reply-to> element <kwd:MAY>
4916        be used.
4917    
4918        RFC 4685 assigns no significance to the order in which
4919        multiple <XE::thr|in-reply-to> element appear within
4920        an entry.
4921    
4922      @Test:
4923        @@QName: AtomThreadInReplyToElement.1.test
4924        @@PerlDef:
4925          my $doc;
4926          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
4927    
4928          my $el = $doc->create_element_ns (<Q::thr|>, 'in-reply-to');
4929    
4930          $test->id ('interface');
4931          $test->assert_isa ($el, <IFName::AtomThreadInReplyToElement>);
4932    
4933          $test->id ('feature');
4934          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
4935    
4936      @ATTR:
4937        @@Name: ref
4938        @@enDesc:
4939          The <XA::ref> attribute of the element.
4940    
4941          It <kwd:MUST> <I::reflect the URI value
4942          of the <XA::ref> attribute> of the node.
4943    
4944          The <XA::ref> attribute specifies the persistent,
4945          universally unique identifier of the resource being
4946          responded to.  The value <kwd:MUST> conform to
4947          the same construction and comparison rules as the
4948          value of the <XE::atom|id> element.  Though the IRI
4949          might use a dereferenceable scheme, processors <kwd:MUST-NOT>
4950          assume that it can be dereferenced.
4951    
4952          The <XE::thr|in-reply-to> element <kwd:MUST> contain
4953          a <XA::ref> attribute identifying the resource that
4954          is being respnoded to.
4955    
4956          If the resource being responded to does not have a persistent,
4957          universally unique identifier, the publisher <kwd:MUST> assign an
4958          identifier that satisfies all the considerations in Section 4.2.6 of
4959          RFC 4287 for use as the value of the <XA::ref> attribute.
4960          In that case, if a representation of the resource can be retrieved
4961          from an IRI that can be used as a valid atom:id value, then this IRI
4962          <kwd:SHOULD> be used as the value of both the <XA::ref> and
4963          <XA::href> attributes.
4964        @@Type: DOMString
4965        @@actualType: DOMURI
4966        @@Get:
4967          @@@nullCase:
4968            @@@@enDesc:
4969              If the algorithm returns <DOM::null>.
4970          @@@PerlDef:
4971            __CODE{getReflectAttrURIValue::
4972              $node => $self,
4973              $namespaceURI => {null},
4974              $localName => 'ref',
4975              $r => $r,
4976              $defaultValue => {null},
4977            }__;
4978        @@Set:
4979          @@@nullCase:
4980            @@@@enDesc:
4981              Removes the attribute.
4982          @@@NodeReadOnlyError:
4983          @@@PerlDef:
4984            __CODE{setReflectAttrURIValue::
4985              $node => $self,
4986              $namespaceURI => {null},
4987              $localName => 'ref',
4988              $given => $given,
4989            }__;
4990            
4991      @ATTR:
4992        @@Name: source
4993        @@enDesc:
4994          The <XA::source> attribute of the element.
4995    
4996          It <kwd:MUST> <I::reflect the URI value
4997          of the <XA::source> attribute> of the node.
4998    
4999          The <XA::source> attribute <kwd:MAY> be used to specify the IRI
5000          of an Atom Feed or Entry Document containing an
5001          <XE::atom|entry> with an <XE::atom|id> value equal to the
5002          value of the <XA::ref> attribute.  The IRI specified <kwd:MUST>
5003          be dereferenceable.
5004        @@Type: DOMString
5005        @@actualType: DOMURI
5006        @@Get:
5007          @@@nullCase:
5008            @@@@enDesc:
5009              If the algorithm returns <DOM::null>.
5010          @@@PerlDef:
5011            __CODE{getReflectAttrURIValue::
5012              $node => $self,
5013              $namespaceURI => {null},
5014              $localName => 'source',
5015              $r => $r,
5016              $defaultValue => {null},
5017            }__;
5018        @@Set:
5019          @@@nullCase:
5020            @@@@enDesc:
5021              Removes the attribute.
5022          @@@NodeReadOnlyError:
5023          @@@PerlDef:
5024            __CODE{setReflectAttrURIValue::
5025              $node => $self,
5026              $namespaceURI => {null},
5027              $localName => 'source',
5028              $given => $given,
5029            }__;
5030            
5031      @ATTR:
5032        @@Name: href
5033        @@enDesc:
5034          The <XA::href> attribute of the element.
5035    
5036          It <kwd:MUST> <I::reflect the URI value
5037          of the <XA::href> attribute> of the node.
5038    
5039          The <XA::href> attribute specifies an IRI that may be used
5040          to retrieve a representation of the resource being
5041          responded to.  The IRI specified <kwd:MUST> be
5042          dereferenceable.
5043        @@Type: DOMString
5044        @@actualType: DOMURI
5045        @@Get:
5046          @@@nullCase:
5047            @@@@enDesc:
5048              If the algorithm returns <DOM::null>.
5049          @@@PerlDef:
5050            __CODE{getReflectAttrURIValue::
5051              $node => $self,
5052              $namespaceURI => {null},
5053              $localName => 'href',
5054              $r => $r,
5055              $defaultValue => {null},
5056            }__;
5057        @@Set:
5058          @@@nullCase:
5059            @@@@enDesc:
5060              Removes the attribute.
5061          @@@NodeReadOnlyError:
5062          @@@PerlDef:
5063            __CODE{setReflectAttrURIValue::
5064              $node => $self,
5065              $namespaceURI => {null},
5066              $localName => 'href',
5067              $given => $given,
5068            }__;
5069      
5070      @ATTR:
5071        @@Name: type
5072        @@enDesc:
5073          The <XA::type> attribute of the element.
5074    
5075          It <kwd:MUST> <I::reflect the string value
5076          of the <XA::type> attribute> of the node.
5077    
5078          The <XA::type> attribute <kwd:MAY> be used to provide
5079          a hint to the client about the media type of the
5080          resource identified by the <XA::href> attribute.
5081          The <XA::type> attribute is only meaningful if a
5082          corresponding <XA::href> attribute is also provided.
5083        @@Type: DOMString
5084        @@Get:
5085          @@@nullCase:
5086            @@@@enDesc:
5087              If the algorithm returns <DOM::null>.
5088          @@@PerlDef:
5089            __CODE{getReflectAttrStringValue::
5090              $node => $self,
5091              $namespaceURI => {null},
5092              $localName => 'type',
5093              $r => $r,
5094              $defaultValue => {null},
5095            }__;
5096        @@Set:
5097          @@@nullCase:
5098            @@@@enDesc:
5099              Removes the attribute.
5100          @@@NodeReadOnlyError:
5101          @@@PerlDef:
5102            __CODE{setReflectAttrStringValue::
5103              $node => $self,
5104              $namespaceURI => {null},
5105              $localName => 'type',
5106              $given => $given,
5107            }__;
5108    ##AtomThreadInReplyToElement
5109    
5110    IFClsDef:
5111      @IFQName: AtomLinkElementThread
5112      @ClsQName: ManakaiAtomLinkElementThread
5113    
5114      @ClsISA: ManakaiAtomLinkElement
5115    
5116      @f:implements: AtomThreadingFeature10
5117    
5118      @enDesc:
5119        An <XE::atom|link> element with a <XA::rel> attribute value of
5120        <XML::replies> may be used to reference a resource where responses
5121        to an entry may be found.  If the <XA::type> attribute of the
5122        <XE::atom|link> is omitted, its value is assumed to be
5123        <XML::application/atom+xml>.
5124    
5125        A <XML::replies> link appearing as a child of the <XE::atom|feed>
5126        or <XE::atom|source> element indicates that the referenced
5127        resource likely contains responses to any of that
5128        feed's entries.  A <XML::replies>
5129        link appearing as a child of an <XE::atom|entry> element
5130        indicates that the linked resource likely contains responses
5131        specific to that entry.
5132    
5133        If the feature <Feature^^DISCore|QName::AtomThreadingFeature10>
5134        is supported, any <IF::Element> whose element type
5135        is <XE::atom|link> <kwd:MUST> implement the <IF::AtomLinkElementThread>
5136        interface in addition to other appropriate interfaces.
5137    
5138      @Test:
5139        @@QName: AtomLinkElementThread.1.test
5140        @@PerlDef:
5141          my $doc;
5142          __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5143    
5144          my $el = $doc->create_element_ns (<Q::atom|>, 'link');
5145    
5146          $test->id ('interface');
5147          $test->assert_isa ($el, <IFName::AtomLinkElementThread>);
5148    
5149          $test->id ('feature');
5150          $test->assert_true ($el->is_supported (<Q::fe|AtomThreading> => '1.0'));
5151    
5152      @ATTR:
5153        @@Name: threadCount
5154        @@enDesc:
5155          The <XA::thr|count> attribute of the element.
5156    
5157          It <kwd:MUST> <I::reflect the non-negative integer value
5158          of the <XA::thr|count> attribute> of the node.
5159    
5160          An <XE::atom|link> element using the <XML::replies>
5161          <XA::rel> attribute value <kwd:MAY> contain
5162          a <XA::thr|count> attribute whose value is a
5163          non-negative integer that provides a hint to clients
5164          as to the total number of replies contained by the
5165          linked resource.  The value is advisory and
5166          may not accurately reflect the actual number of replies.
5167        @@Type: idl|long
5168        @@Get:
5169          @@@PerlDef:
5170            __CODE{getReflectAttrNonNegativeIntegerValue::
5171              $node => $self,
5172              $namespaceURI => {<Q::thr|>},
5173              $localName => 'count',
5174              $r => $r,
5175              $defaultValue => {null},
5176            }__;
5177        @@Set:
5178          @@@NodeReadOnlyError:
5179          @@@PerlDef:
5180            __CODE{setReflectAttrNonNegativeIntegerValue::
5181              $node => $self,
5182              $namespaceURI => {<Q::thr|>},
5183              $localName => 'count',
5184              $given => $given,
5185            }__;
5186    
5187        @@Test:
5188          @@@QName: AtomLinkElementThread.threadCount.1.test
5189          @@@PerlDef:
5190            my $doc;
5191            __CODE{tc|createEmptyDocumentForTest:: $doc => $doc}__;
5192    
5193            my $link = $doc->create_element_ns (<Q::atom|>, 'link');
5194    
5195            $test->id ('default');
5196            $test->assert_num_equals
5197                     (expected_value => -1,
5198                      actual_value =>
5199                        $link-><AG::AtomLinkElementThread.threadCount>);
5200    
5201            $test->id ('zero');
5202            $link-><AS::AtomLinkElementThread.threadCount> (0);
5203            $test->assert_num_equals
5204                     (expected_value => 0,
5205                      actual_value =>
5206                        $link-><AG::AtomLinkElementThread.threadCount>);
5207            $test->id ('zero.attr');
5208            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '0');
5209    
5210            $test->id ('one');
5211            $link-><AS::AtomLinkElementThread.threadCount> (1);
5212            $test->assert_num_equals
5213                     (expected_value => 1,
5214                      actual_value =>
5215                        $link-><AG::AtomLinkElementThread.threadCount>);
5216            $test->id ('one.attr');
5217            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'), '1');
5218    
5219            $test->id ('10000');
5220            $link-><AS::AtomLinkElementThread.threadCount> (10000);
5221            $test->assert_num_equals
5222                     (expected_value => 10000,
5223                      actual_value =>
5224                        $link-><AG::AtomLinkElementThread.threadCount>);
5225            $test->id ('10000.attr');
5226            $test->assert_equals ($link->get_attribute_ns (<Q::thr|>, 'count'),
5227                                  '10000');
5228    
5229            $test->id ('+10000');
5230            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '+10000');
5231            $test->assert_num_equals
5232                     (expected_value => 10000,
5233                      actual_value =>
5234                        $link-><AG::AtomLinkElementThread.threadCount>);
5235    
5236            $test->id ('010000');
5237            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '010000');
5238            $test->assert_num_equals
5239                     (expected_value => 10000,
5240                      actual_value =>
5241                        $link-><AG::AtomLinkElementThread.threadCount>);
5242    
5243            $test->id ('-100');
5244            $link-><AS::AtomLinkElementThread.threadCount> (-100);
5245            $test->assert_num_equals
5246                     (expected_value => -1,
5247                      actual_value =>
5248                        $link-><AG::AtomLinkElementThread.threadCount>);
5249            $test->id ('-100.attr');
5250            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5251    
5252            $test->id ('120a');
5253            $link->set_attribute_ns (<Q::thr|>, 'thr:count', '120a');
5254            $test->assert_num_equals
5255                     (expected_value => -1,
5256                      actual_value =>
5257                        $link-><AG::AtomLinkElementThread.threadCount>);
5258    
5259            $test->id ('-1');
5260            $link-><AS::AtomLinkElementThread.threadCount> (-1);
5261            $test->assert_num_equals
5262                     (expected_value => -1,
5263                      actual_value =>
5264                        $link-><AG::AtomLinkElementThread.threadCount>);
5265            $test->id ('-1.attr');
5266            $test->assert_false ($link->has_attribute_ns (<Q::thr|>, 'count'));
5267    
5268      @enImplNote:
5269        @@ddid: updated
5270        @@@:
5271          {TODO::
5272            <XA::thr|updated> attribute
5273          }
5274    ##AtomLinkElementThread
5275    
5276    enImplNote:
5277      @@ddid: total
5278      @@@:
5279        {TODO::
5280          <XE::thr|total>
5281        }
5282    
5283    enImplNote:
5284      @@ddid: threaddtd
5285      @@@:
5286        {TODO::
5287          DTD impl for threading
5288        }

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24