<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>The <code class="DOMi" xml:lang="en">DocumentTypeDefinition</code> Interface</h1><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">manakai//DOM Extensions</anchor> &gt; <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM XML Document Type Definition</anchor>
module &gt; New Interfaces &gt; The <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code>
Interface</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> In an implementation that supports the 
<code class="URI" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">http://suika.fam.cx/www/2006/feature/XDoctype</anchor></code>
feature, a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentType</anchor></code> node
must implement the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code>
interface.  See <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DOM XML Document Type Definition</anchor> for
details.</p><section><h1>Children</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">elementTypes</anchor></code> attribute</dfn>
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> interface
is a live <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object that 
contains all element types belongs to the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code>
node.  The type of the attribute is <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>.
The attribute is read-only.</p><p>What are contained in this collection depends on how
the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> node was created.  If the
node was created as the result of parsing of an XML document,
it <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor>  contain all element types whose element type and / or 
attribute definition list declaration are encountered by and provided for the DOM
implementation from the XML processor.  Note that the XML processor might not 
provide a part of or entire such information depending on the configuration.
If more than one declarations for an element type or an attribute is available 
at the time of the definition node construction, then declarations other than 
the first ones <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be discarded.</p><p>The attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>
object that contains all the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ElementTypeDefinition</anchor></code> nodes
belong to the node.  The returned <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be read-only if and only if the node is read-only.
Note that the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object is live
and therefore any change of read-only flag on the node is immediately
reflected by that of the object.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">generalEntities</anchor></code> attribute</dfn>
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> interface
is a live <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object that contains all the
general entities belong to the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> node.
The type of the attribute is <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>.
The attribute is read-only.</p><p>All entities declared in the document type definition
contained in or referenced from the document entity
might not be exposed through this collection, depending
on the information provided by the XML processor for
the DOM implementation.  In particular, it might not
contain any entity if entity references are expanded
at the parse time.  An implementation <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST NOT</strong></anchor>
expose an <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> node whose <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">nodeName</anchor></code>
is equal to the name of one of five predefined general entities in
XML through the collection as the result of parsing of an XML
document that has no error.  Duplicate entity declarations are also discarded.</p><p>The attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>
object that contains all the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Entity</anchor></code> nodes
representing general entities belong to the node.  The returned 
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be read-only if and only if 
the node is read-only. Note that the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object is live
and therefore any change of read-only flag on the node is immediately
reflected by that of the object.</p><p>The attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the same value as the
<code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">entites</anchor></code> attribute of the 
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentType</anchor></code> interface on the same node.</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> The <dfn xml:lang="en"><code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">notations</anchor></code> attribute</dfn>
of the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> interface
is a live <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object that contains
all the notations belong to the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code>
node.  The type of the attribute is <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>.
The attribute is read-only.</p><p>If the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> node is
created from an XML document, duplicate notation declarations, if any, in DTD 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST NOT</strong></anchor> result in a node in the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>
object and only the first declaration <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be
made available as a <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Notation</anchor></code> node.</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">This definition is based on one for the 
<code xmlns="http://www.w3.org/1999/xhtml" class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">notations</anchor></code> attribute of the
<code xmlns="http://www.w3.org/1999/xhtml" class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentType</anchor></code> interface in DOM XML module.
Since duplication is violation to the Validity Constraint,
XML parsers might vary on how notations are notified to
the application.  In particular, <code xmlns="http://www.w3.org/1999/xhtml" class="InfoProp" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">notations</anchor></code>
property of the document information item in XML Information Set
is so defined that in case <em xmlns="http://www.w3.org/1999/xhtml">any</em> notation is declared for 
multiple times then the property has no value.</comment-p><p>The attribute <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> return the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code>
object that contains all the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Notation</anchor></code> nodes
representing notations belong to the node.  The returned 
<code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">MUST</strong></anchor> be read-only if and only if 
the node is read-only. Note that the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">NamedNodeMap</anchor></code> object is live
and therefore any change of read-only flag on the node is immediately
reflected by that of the object.</p><p>A DOM implementation is not required to implement the
<code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">notations</anchor></code> attribute twice
for the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentType</anchor></code> and
the <code class="DOMi" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">DocumentTypeDefinition</anchor></code> interfaces;
the latter is defined to contain the same value as the former.</p></section><section><h1>Open Issues (informative)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> A future version of the interface might define the
<code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">parameterEntities</anchor></code> attribute and 
getter/setter for parameter entities.</p></section></section><section><h1>memo</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end>
This interface is implemented by manakai; see <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://suika.fam.cx/gate/cvs/messaging/manakai/lib/Message/DOM/DocumentType.pm" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">http://suika.fam.cx/gate/cvs/messaging/manakai/lib/Message/DOM/DocumentType.pm</anchor-external> for its source code.</p></section></body></html>