/[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.18 by wakaba, Tue Dec 4 11:08:48 2007 UTC revision 1.19 by wakaba, Wed Dec 5 07:38:14 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-04>4 December 2007</time></h2>  <h2>Working Draft <time datetime=2007-12-05>5 December 2007</time></h2>
14    
15  <dl class="versions-uri">  <dl class="versions-uri">
16  <dt>This Version</dt>  <dt>This Version</dt>
# Line 164  consists of three interfaces:</p> Line 164  consists of three interfaces:</p>
164  the <abbr>DOM</abbr> Document Type Definition module, the  the <abbr>DOM</abbr> Document Type Definition module, the
165  <code>hasFeature</code> method of a <code>DOMImplementation</code> object  <code>hasFeature</code> method of a <code>DOMImplementation</code> object
166  <em class=rfc2119>MUST</em> return <code>true</code> when the parameters are  <em class=rfc2119>MUST</em> return <code>true</code> when the parameters are
167  set to <code>http://suika.fam.cx/www/2006/feature/XDoctype</code> and  set to
168  <code>3.0</code> respectively.</p>  <dfn id=feature-XDoctype><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></dfn>
169    and <dfn id=feature-XDoctype-3.0><code>3.0</code></dfn> respectively.</p>
170    
171  <p>In such an implementation, the <code>getFeature</code> method of a  <p>In such an implementation, the <code>getFeature</code> method of a
172  <code>Document</code> object <em class=rfc2119>MUST</em> return the (at least  <code>Document</code> object <em class=rfc2119>MUST</em> return the (at least
173  conceptually) same object implementing the  conceptually) same object implementing the
174  <a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface when  <a href="#DocumentXDoctype"><code>DocumentXDoctype</code></a> interface when
175  the parameters are set to  the parameters are set to
176  <code>http://suika.fam.cx/www/2006/feature/XDoctype</code> and  <a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>
177  <code>3.0</code> respectively.  Likewise, any method that takes one or more  and <a href="#feature-XDoctype-3.0"><code>3.0</code></a> respectively.  
178  feature names with or without version number, including the methods  Likewise, any method that takes one or more feature names with or without
179  <code>hasFeature</code> and <code>getFeature</code>,  version number, including the methods <code>hasFeature</code> and
180  <em class=rfc2119>MUST</em> behave in a manner consistent with the  <code>getFeature</code>, <em class=rfc2119>MUST</em> behave in a manner
181  aforementioned cases.</p>  consistent with the aforementioned cases.</p>
182  </div>  </div>
183    
184  <div class=section id=section-node>  <div class=section id=section-node>
# Line 218  these kinds of nodes, methods and attrib Line 219  these kinds of nodes, methods and attrib
219      of the node in the <code>ownerDocument</code> attribute of the node.      of the node in the <code>ownerDocument</code> attribute of the node.
220      Note that the value might be <code>null</code>.</p>      Note that the value might be <code>null</code>.</p>
221    </dd>    </dd>
222    <dt><code id=isEqualNode>isEqualNode</code></dt>
223      <dd><p>For the <a href="#isEqualNode"><code>isEqualNode</code></a> method,
224      following items are added to the list of conditions for equality:</p>
225    
226      <ul>
227      <li>
228        <p>If the nodes are <a href="#DocumentType"><code>DocumentType</code></a>
229        and at least one of them has the support for the feature
230        <a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>:</p>
231        <ul>
232        <li>they are equal according to <abbr>DOM</abbr> level 3 definition
233        <span class=ed>@@ ref</span>, and
234        <li>either:
235          <ul><!--
236          <li>both of them does not support the feature
237          <a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>,</li>-->
238          <li>exactly one of them support the feature
239          <a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>
240          and the <code>length</code> attribute of the <code>NamedNodeMap</code>
241          object in the <a href="#elementTypes"><code>elementTypes</code></a>
242          attribute of it is equal to <code>0</code>, or</li>
243          <li>both of them support the feature
244          <a href="#feature-XDoctype"><code>http://suika.fam.cx/www/2006/feature/XDoctype</code></a>
245          and the values of the
246          <a href="#elementTypes"><code>elementTypes</code></a> attributes are
247          equal (equality of the
248          <a href="#elementTypes"><code>elementTypes</code></a> attribute is same
249          as that for the <code>attributes</code> attribute).</li>
250          </ul>
251        </li>
252        </ul>
253      </li>
254    
255      <li><p>If the nodes are
256      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>,
257      the values of the
258      <a href="#attributeDefinitions"><code>attributeDefinitions</code></a>
259      attributes are equal (equality of the
260      <a href="#attributeDefinitions"><code>attributeDefinitions</code></a>
261      attribute is same as that for the <code>attributes</code> attribute).</p></li>
262    
263      <li><p>If the nodes are
264      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>,
265      the values of the <a href="#declaredType"><code>declaredType</code></a> and
266      the <a href="#defaultType"><code>defaultType</code></a> attributes are
267      equal respectively.</p></li>
268    
269      <li><p>If the nodes are
270      <a href="#AttributeDefinition"><code>AttributeDefinition</code></a>,
271      the values of the <code>DOMStringList</code> objects in the
272      <a href="#allowedTokens"><code>allowedTokens</code></a> attributes
273      are equal, i.e. their <code>length</code> attribute values are equal and
274      each string exists in a list is contained in another list (their indeces
275      may be different), with an additional constraint that the number of the
276      items that are equal to a string in a list is equal to the number
277      of the items equal to the string in another list.</p></li>
278      </ul></dd>
279  <dt><code id=nodeName>nodeName</code></dt>  <dt><code id=nodeName>nodeName</code></dt>
280    <dd>    <dd>
281      <p>If the node is an      <p>If the node is an
# Line 472  method</dt> Line 530  method</dt>
530      <code>manakaiEntityBaseURI</code>, and      <code>manakaiEntityBaseURI</code>, and
531      <code>manakaiEntityURI</code> <span class=ed>@@ ref</span></dt>      <code>manakaiEntityURI</code> <span class=ed>@@ ref</span></dt>
532        <dd>No explicit value is set.</dd>        <dd>No explicit value is set.</dd>
533      <dt><code>manakaiHasReplacementTree</code> and      <dt><a href="#hasReplacementTree"><code>hasReplacementTree</code></a> and
534      <code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt>      <code>manakaiReadOnly</code> <span class=ed>[manakai]</span></dt>
535        <dd><code>false</code>.</dd>        <dd><code>false</code>.</dd>
536      <dt><code>nodeName</code></dt>      <dt><code>nodeName</code></dt>
# Line 821  node for that element type.</p> Line 879  node for that element type.</p>
879  <p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>  <p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
880  interface <em class=rfc2119>MUST</em> be implemented as following:</p>  interface <em class=rfc2119>MUST</em> be implemented as following:</p>
881  <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> {
882    readonly attribute <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;    readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;
883    
884    <span class=ed>@@ more</span>    <span class=ed>@@ more</span>
885  }</code></pre>  }</code></pre>
886    
887  <pre class=ed>  <dl>
888  [DFN@en[[CODE(DOMa)@en[[[ownerDocumentTypeDefinition]]]] attribute]]  <dt><dfn id=ownerDocumentTypeDefinition class=dom-attr><code>ownerDocumentTypeDefinition</code></dfn>
889  of the [CODE(DOMi)@en[[[ElementTypeDefinition]]]]  of type <a href="#DocumentType"><code>DocumentType</code></a>, read$B!>(Bonly</dt>
890  interface is defined in [[manakai//DOM Extensions]>>50].</pre>    <dd><p>The
891      <a href="#ownerDocumentTypeDefinition"><code>ownerDocumentTypeDefinition</code></a>
892      attribute of
893      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>,
894      <a href="#Entity"><code>Entity</code></a>, and
895      <a href="#Notation"><code>Notation</code></a> interface contains the
896      <a href="#DocumentType"><code>DocumentType</code></a> node to which the node
897      is attached.</p>
898    
899      <p>On getting, the attribute <em class=rfc2119>MUST</em> return a
900      <a href="#DocumentType"><code>DocumentType</code></a> node.  It
901      <em class=rfc2119>MUST</em> be such a node that whose
902      <a href="#elementTypes"><code>elementTypes</code></a> (for an
903      <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a>
904      node), <a href="#entities"><code>entities</code></a> (for an
905      <a href="#Entity"><code>Entity</code></a> node), or
906      <a href="#notations"><code>notations</code></a> (for a
907      <a href="#Notation"><code>Notation</code></a> node) attribute contains the
908      <code>NamedNodeMap</code> object that contains the node.  If there is no such
909      a <a href="#DocumentType"><code>DocumentType</code></a> node,
910      then <code>null</code> <em class=rfc2119>MUST</em> be returned.</p></dd>
911    </dl>
912  </div>  </div>
913    
914  <div class=section id=section-attributedefinition>  <div class=section id=section-attributedefinition>
# Line 1075  type <code>unsigned short</code></dt> Line 1154  type <code>unsigned short</code></dt>
1154    
1155  </div>  </div>
1156    
1157    <div class=section id=section-entity>
1158    <h3>Modifications to the <code id=Entity>Entity</code> Interface</h3>
1159    
1160    <p>The implementation of the <a href="#Entity"><code>Entity</code></a>
1161    interface <em class=rfc2119>MUST</em> be modified as following:</p>
1162    <pre class=idl><code>// Modifications to the Entity interface
1163      attribute DOMString <a href="#publicId">publicId</a>;
1164      attribute DOMString <a href="#systemId">systemId</a>;
1165      attribute DOMString <a href="#notationName">notationName</a>;
1166    
1167      // Additions to the Entity interface
1168      attribute DOMString <a href="#hasReplacementTree">hasReplacementTree</a>;
1169      readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;
1170    </code></pre>
1171    
1172    <p>The <code id=notationName>notationName</code> attribute of the
1173    <a href="#Entity"><code>Entity</code></a> interface is no longer
1174    read$B!>(Bonly.</p>
1175    
1176    <p>On setting, the attribute <em class=rfc2119>MUST</em> raise a
1177    <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span>
1178    exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>.
1179    Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the value
1180    associated to the attribute.  No lexical validation is performed.  The new
1181    value <em class=rfc2119>MAY</em> be <code>null</code>.</p>
1182    
1183    <dl>
1184    <dt><dfn id=hasReplacementTree class=dom-attr><code>hasReplacementTree</code></dfn>
1185    of type boolean</dt>
1186      <dd><p>Whether the structure of the replacement text of the entity
1187      is available via the <code>NodeList</code> object in the
1188      <code>childNodes</code> attribute of the entity.</p>
1189    
1190      <p>On getting, the attribute <em class=rfc2119>MUST</em> return
1191      the value associated to this attribute.</p>
1192    
1193      <p>On setting, the attribute <em class=rfc2119>MUST</em> raise a
1194      <code>NO_MODIFICATION_ALLOWED_ERR</code> <span class=ed>@@ ref</span>
1195      exception if the node is read$B!>(Bonly <span class=ed>@@ ref</span>.  
1196      Otherwise, it <em class=rfc2119>MUST</em> set the specified value as the
1197      value associated to this attribute.</p>
1198    
1199      <div class="note memo">
1200      <p>The attribute can be set to <code>false</code> even if the
1201      <a href="#Entity"><code>Entity</code></a> node has any child node.
1202      If the attribute is set to <code>false</code>, then any child node of
1203      the <a href="#Entity"><code>Entity</code></a> node ought to be ignored,
1204      say, for the purpose of serialization.</p>
1205      </div>
1206    
1207      <p>When an <code>EntityReference</code> node is created by cloning
1208      the replacement subtree of the <a href="#Entity"><code>Entity</code></a>
1209      node, if the attribute is set to <code>false</code>, then any descendant
1210      of the node <em class=rfc2119>MUST</em> be ignored.</p>
1211    
1212      <p>If the <a href="#Entity"><code>Entity</code></a> node is created during
1213      the process to create a <abbr>DOM</abbr> from an <abbr>XML</abbr> document,
1214      the following requirements are applied:  If the entity is an unparsed
1215      entity, then the attribute <em class=rfc2119>MUST</em> be set to
1216      <code>false</code>.  Otherwise, if the entity is an external entity whose
1217      replacement text is not available, or whose replacement text is not converted
1218      to a replacement tree, then the attribute <em class=rfc2119>MUST</em> be set
1219      to <code>false</code>.  Otherwise, the attribute
1220      <em class=rfc2119>MUST</em> be set to <code>true</code>.</p>
1221    
1222      <div class="note memo">
1223      <p>An <a href="#Entity"><code>Entity</code></a> node created by the
1224      <a href="#createGeneralEntity"><code>createGeneralEntity</code></a> method
1225      has its <a href="#hasReplacementTree"><code>hasReplacementTree</code></a>
1226      attribute set to <code>false</code>.</p>
1227      </div></dd>
1228    </dl>
1229  </div>  </div>
1230    
1231    <div class=section id=section-notation>
1232    <h3>Modifications to the <code id=Notation>Notation</code> Interface</h3>
1233    
1234    <p>The implementation of the <a href="#Notation"><code>Notation</code></a>
1235    interface <em class=rfc2119>MUST</em> be modified as following:</p>
1236    <pre class=idl><code>// Modifications to the Notation interface
1237      attribute DOMString <a href="#publicId">publicId</a>;
1238      attribute DOMString <a href="#systemId">systemId</a>;
1239    
1240      // Addition to the Notation interface
1241      readonly attribute <a href="#DocumentType">DocumentType</a> <a href="#ownerDocumentTypeDefinition">ownerDocumentTypeDefinition</a>;
1242    </code></pre>
1243    </div>
1244    
1245    <div class=section id=section-processinginstruction>
1246    <h3>Modifications to the
1247    <code id=ProcessingInstruction>ProcessingInstruction</code> Interface</h3>
1248    
1249    <div class=ed>...</div>
1250    </div>
1251    
1252    </div>
1253    
1254  <div id="references" class="section reference">  <div id="references" class="section reference">
1255  <h2>References</h2>  <h2>References</h2>

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24