/[suikacvs]/markup/xml/domdtdef/domdtdef-work.en.html
Suika

Diff of /markup/xml/domdtdef/domdtdef-work.en.html

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

revision 1.20 by wakaba, Wed Dec 5 10:26:35 2007 UTC revision 1.21 by wakaba, Sat Dec 8 07:01:08 2007 UTC
# Line 10  Line 10 
10    
11  <div class="header">  <div class="header">
12  <h1>DOM Document Type Definition Module</h1>  <h1>DOM Document Type Definition Module</h1>
13  <h2>Working Draft <time datetime=2007-12-05>5 December 2007</time></h2>  <h2>Working Draft <time datetime=2007-12-08>8 December 2007</time></h2>
14    
15  <dl class="versions-uri">  <dl class="versions-uri">
16  <dt>This Version</dt>  <dt>This Version</dt>
# Line 331  following:</p> Line 331  following:</p>
331    <dd>    <dd>
332      <p>If the node is an      <p>If the node is an
333      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>:      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>:
334      On getting, the attributes <em class=rfc2119>MUST</em> return the      On getting, the attributes <em class=rfc2119>MUST</em> return
335      name of the element type.</p>      <code>null</code>.</p>
336    
337      <div class="note memo">      <div class="note memo">
338        <p>Thus, on setting the attributes does nothing        <p>Thus, on setting the attributes does nothing
# Line 344  following:</p> Line 344  following:</p>
344      <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span>.      <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span>.
345      <span class=ed>@@ I forgot why this requirement is necessary.</span></p>      <span class=ed>@@ I forgot why this requirement is necessary.</span></p>
346    
347      <p>If the node is an    <p>If the node is an
348      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>:</p>    <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>:
349      The attribute <em class=rfc2119>MUST</em> behave as if the node
350      <pre class=ed>    were <code>Attr</code> <span class=ed>[DOM3]</span>.</p></dd>
 The getter of the [CODE(DOMa)@en[[[nodeValue]]]] attribute  
 of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object  
 [['''MUST''']] return the normalized default value  
 of the attribute.  
   
 @@  
   
 [4] The getter of the [CODE(DOMa)@en[[[textContent]]]]  
 attribute of an [CODE(DOMi)@en[[[AttributeDefinition]]]]  
 object [['''MUST''']] behave as if it were an  
 [CODE(DOMi)@en[[[Attr]]]] object.  
   
 The setter of the [CODE(DOMa)@en[[[textContent]]]] attribute  
 of an [CODE(DOMi)@en[[[AttributeDefinition]]]] object  
 [['''MUST''']] behave as if the following algorithm  
 is performed:  
 = If the [CODE(DOMi)@en[[[AttributeDefinition]]]]  
 object is read-only, then throw an  
 [CODE(DOMc)@en[[[NO_MODIFICATION_ALLOWED_ERR]]]].  
 = Remove any child node the node has.  
 = If the new value is not empty and not [CODE(IDL)@en[[[null]]]],  
 then create a [CODE(DOMi)@en[[[Text]]]] node  
 whose [CODE(DOMa)@en[[[data]]]] is the new value  
 and append it to the [CODE(DOMi)@en[[[AttributeDefinition]]]].  
 </pre>  
   </dd>  
351  <dt><code id=normalize>normalize</code></dt>  <dt><code id=normalize>normalize</code></dt>
352    <dd><p>When a <a href="#DocumentType"><code>DocumentType</code></a> is    <dd><p>When a <a href="#DocumentType"><code>DocumentType</code></a> is
353    normalized, any nodes in the <code>NamedNodeMap</code> object in the    normalized, any nodes in the <code>NamedNodeMap</code> object in the
# Line 793  type <code>NamedNodeMap</code>, read$B! Line 767  type <code>NamedNodeMap</code>, read$B!
767    the <code>ElementTypeDefinition</code> nodes for the element types    the <code>ElementTypeDefinition</code> nodes for the element types
768    whose name is presented as the <code>Name</code> of the element type or    whose name is presented as the <code>Name</code> of the element type or
769    attribute definition list declarations processed by the <abbr>XML</abbr>    attribute definition list declarations processed by the <abbr>XML</abbr>
770    processor.  If there is more than one element type declarations for an    processor.  If there are more than one element type declarations for an
771    element type, then the declarations other than the first one    element type, then the declarations other than the first one
772    <em class=rfc2119>MUST</em> be ignored for the purpose of constructing the    <em class=rfc2119>MUST</em> be ignored for the purpose of constructing the
773    <code>NamedNodeMap</code> object.</p></dd>    <code>NamedNodeMap</code> object.</p></dd>
# Line 963  method</dt> Line 937  method</dt>
937    
938  <p>The nodes of type  <p>The nodes of type
939  <a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a>  <a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a>
940  represents an element type definition.  Such a node implements the  represents an element type definition.  Such a node
941    <em class=rfc2119>MUST</em> implement the
942  <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>  <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
943  interface, which extends the <a href="#Node"><code>Node</code></a>  interface, which extends the <a href="#Node"><code>Node</code></a>
944  interface.</p>  interface.</p>
# Line 982  declaration for that element type, the < Line 957  declaration for that element type, the <
957  <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>  <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
958  node for that element type.</p>  node for that element type.</p>
959    
960    <p>An <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
961    node cannot be a child of any node.  An
962    <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node
963    cannot have any child node.</p>
964    
965  <p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>  <p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
966  interface <em class=rfc2119>MUST</em> be implemented as following:</p>  interface <em class=rfc2119>MUST</em> be implemented as following:</p>
967  <pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> {  <pre class=idl><code>interface <dfn id=ElementTypeDefinition><code>ElementTypeDefinition</code></dfn> : <a href="#Node">Node</a> {
968    readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;    readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;
969    
970    <span class=ed>@@ more</span>    readonly attribute NamedNodeMap <a href="#attributeDefinitions">attributeDefinitions</a>;
971      <a href="#AttributeDefinition">AttributeDefinition</a> <a href="#getAttributeDefinitionNode">getAttributeDefinitionNode</a>
972        (in DOMString <a href="#getAttributeDefinitionNode-name"><var>name</var></a>);
973      void <a href="#setAttributeDefinitionNode">setAttributeDefinitionNode</a>
974        (in <a href="#AttributeDefinition">AttributeDefinition</a> <a href="#setAttributeDefinitionNode-name"><var>node</var></a>)
975        raises (DOMException);
976  }</code></pre>  }</code></pre>
977    
978  <dl>  <dl>
# Line 1014  of type <a href="#DocumentType"><code>Do Line 999  of type <a href="#DocumentType"><code>Do
999    <code>NamedNodeMap</code> object that contains the node.  If there is no such    <code>NamedNodeMap</code> object that contains the node.  If there is no such
1000    a <a href="#DocumentType"><code>DocumentType</code></a> node,    a <a href="#DocumentType"><code>DocumentType</code></a> node,
1001    then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd>    then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd>
1002    <dt><dfn id=attributeDefinitions class=dom-attr><code>attributeDefinitions</code></dfn>
1003    of type NamedNodeMap, read$B!>(Bonly</dt>
1004      <dd><p>A live <code>NamedNodeMap</code> object that contains all the
1005      attribute definitions belonging to the
1006      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
1007      node.</p>
1008    
1009      <p>On getting, the attribute <em class=rfc2119>MUST</em> return the
1010      <code>NamedNodeMap</code> object that contains all the
1011      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node
1012      belonging to the
1013      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node.
1014      The <code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be
1015      read$B!>(Bonly if and only if the node is read$B!>(Bonly.  The
1016      <code>NamedNodeMap</code> object <em class=rfc2119>MUST</em> be live and
1017      the same object <em class=rfc2119>MUST</em> be returned for any
1018      invocation.</p>
1019      
1020      <p>If the
1021      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node
1022      is created during the process to create a <abbr>DOM</abbr> from an
1023      <abbr>XML</abbr> document, the following requirements are applied:  The
1024      <code>NamedNodeMap</code> object in the
1025      <a href="#attributeDefinitions"><code>attributeDefinitions</code></a>
1026      attribute <em class=rfc2119>MUST</em> be so transformed that the object
1027      contains the
1028      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node
1029      corresponding to the attribute definitions in the attribute definition
1030      list declarations processed by the <abbr>XML</abbr> processor and
1031      associated to the element type represented by the node.  If there are more
1032      than one attribute definitions for an attribute, then the definitions other
1033      than the first one <em class=rfc2119>MUST</em> be ignored for the purpose
1034      of constructing the <code>NamedNodeMap</code> object.</p></dd>
1035    <dt><dfn id=getAttributeDefinitionNode class=dom-method><code>getAttributeDefinitionNode</code></dfn>,
1036    method</dt>
1037      <dd><p>Return the
1038      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node
1039      with the specified name.</p>
1040    
1041      <p>The
1042      <dfn id=getAttributeDefinitionNode-name class=dom-param><var>name</var></dfn>
1043      parameter is the name of the attribute.</p>
1044    
1045      <p>When invoked, the method <em class=rfc2119>MUST</em> return the
1046      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node,
1047      whose <a href="#nodeName"><code>nodeName</code></a> attribute value is
1048      equal to <a href="#getAttributeDefinitionNode-name"><var>name</var></a>,
1049      in the <code>NamedNodeMap</code> in the
1050      <a href="#attributeDefinitions"><code>attributeDefinitions</code></a>
1051      attribute of the node.  If there is no such node, it
1052      <em class=rfc2119>MUST</em> return <code>null</code>.</p></dd>
1053    <dt><dfn id=setAttributeDefinitionNode class=dom-method><code>setAttributeDefinitionNode</code></dfn>,
1054    method</dt>
1055      <dd class=ed>@@</dd>
1056  </dl>  </dl>
1057    
1058  <div class=ed>  <div class=ed>
# Line 1028  element type.</p> Line 1067  element type.</p>
1067    
1068  <p>The nodes of type  <p>The nodes of type
1069  <a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a>  <a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a>
1070  represents an attribute definition.  Such a node implements the  represents an attribute definition.  Such a node
1071    <em class=rfc2119>MUST</em> implement the
1072  <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> interface,  <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> interface,
1073  which extends the <a href="#Node"><code>Node</code></a> interface.</p>  which extends the <a href="#Node"><code>Node</code></a> interface.</p>
1074    
# Line 1042  type in <abbr>DTD</abbr>, the result <ab Line 1082  type in <abbr>DTD</abbr>, the result <ab
1082  <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node for  <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node for
1083  that attribute.</p>  that attribute.</p>
1084    
1085    <p>An <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>
1086    node cannot be a child of any node.  An
1087    <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node
1088    can have zero or more child nodes of same kinds as those allowed for
1089    <code>Attr</code> nodes <span class=ed>[DOM3]</span>.</p>
1090    
1091  <p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>  <p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>
1092  interface <em class=rfc2119>MUST</em> be implemented as following:</p>  interface <em class=rfc2119>MUST</em> be implemented as following:</p>
1093  <pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> {  <pre class=idl><code>interface <dfn id=AttributeDefinition><code>AttributeDefinition</code></dfn> : <a href="#Node">Node</a> {
# Line 1069  interface <em class=rfc2119>MUST</em> be Line 1115  interface <em class=rfc2119>MUST</em> be
1115    readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>;    readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>;
1116    
1117    readonly attribute unsigned short <a href="#declaredType">declaredType</a>;    readonly attribute unsigned short <a href="#declaredType">declaredType</a>;
1118      readonly attribute DOMStringList <a href="#allowedTokens">allowedTokens</a>;
1119    readonly attribute unsigned short <a href="#defaultType">defaultType</a>;    readonly attribute unsigned short <a href="#defaultType">defaultType</a>;
   
   <span class=ed>...</span>  
1120  }</code></pre>  }</code></pre>
1121    
1122  <dl>  <dl>
# Line 1194  be used.</p> Line 1239  be used.</p>
1239  definition group.</p>  definition group.</p>
1240    
1241    </dd>    </dd>
1242    <dt><dfn id=allowedTokens class=dom-attr><code>allowedTokens</code></dfn> of
1243    type <code>DOMStringList</code>, read$B!>(Bonly</dt>
1244      <dd><p>The list of allowed attribute values.</p>
1245    
1246      <p>On getting, the attribute <em class=rfc2119>MUST</em> return the
1247      <code>DOMStringList</code> object associated to this attribute.  The object
1248      <em class=rfc2119>MAY</em> contain zero or more ordered strings, consist of
1249      zero or more characters respectively, possibly with duplications.  The
1250      object <em class=rfc2119>MUST</em> be read$B!>(Bonly if and only if the node
1251      is read$B!>(Bonly.</p>
1252    
1253      <p>If the <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>
1254      node is created during the process to create a <abbr>DOM</abbr> from an
1255      <abbr>XML</abbr> document, the object <em class=rfc2119>MUST</em> contain
1256      the names or name tokens allowed for the attribute defined by the node.
1257      If the document is well$B!>(Bformed, the object will be empty unless
1258      the <a href="#declaredType"><code>declaredType</code></a> is
1259      <a href="#ENUMERATION_ATTR"><code>ENUMERATION_ATTR</code></a> or
1260      <a href="#NOTATION_ATTR"><code>NOTATION_ATTR</code></a>.</p>
1261    
1262      <p>If the <a href="#declaredType"><code>declaredType</code></a> is different
1263      from <a href="#ENUMERATION_ATTR"><code>ENUMERATION_ATTR</code></a> or
1264      <a href="#NOTATION_ATTR"><code>NOTATION_ATTR</code></a>, this attribute
1265      <em class=rfc2119>MUST</em> be ignored for the purpose of serializing
1266      into (part of) <abbr>XML</abbr> document.</p>
1267    
1268      <div class="note memo">
1269        <p>When serializing the node it should be noted that the object might
1270        be empty, might contain duplications, and might contain strings that are
1271        not names or name tokens.</p>
1272      </div></dd>
1273  <dt><dfn id=defaultType class=dom-attr><code>defaultType</code></dfn> of  <dt><dfn id=defaultType class=dom-attr><code>defaultType</code></dfn> of
1274  type <code>unsigned short</code></dt>  type <code>unsigned short</code></dt>
1275    <dd><p>The type of the default for the attribute.  It is expected that this    <dd><p>The type of the default for the attribute.  It is expected that this

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24