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

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24