634 |
<div class=section id=section-documenttypedefinition> |
<div class=section id=section-documenttypedefinition> |
635 |
<h3>The <code>DocumentTypeDefinition</code> Interface</h3> |
<h3>The <code>DocumentTypeDefinition</code> Interface</h3> |
636 |
|
|
637 |
|
<div class="note memo"> |
638 |
|
<p>This interface is a separated interface from the |
639 |
|
<a href="#DocumentType"><code>DocumentType</code></a>, not a set of extensions |
640 |
|
to the <a href="#DocumentType"><code>DocumentType</code></a>, |
641 |
|
for the historical reason.</p> |
642 |
|
</div> |
643 |
|
|
644 |
<p>The |
<p>The |
645 |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
<a href="#DocumentTypeDefinition"><code>DocumentTypeDefinition</code></a> |
646 |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
791 |
<div class=section id=section-elementtypedefinition> |
<div class=section id=section-elementtypedefinition> |
792 |
<h3>The <code>ElementTypeDefinition</code> Interface</h3> |
<h3>The <code>ElementTypeDefinition</code> Interface</h3> |
793 |
|
|
794 |
|
<p>The nodes of type |
795 |
|
<a href="#ELEMENT_TYPE_DEFINITION_NODE"><code>ELEMENT_TYPE_DEFINITION_NODE</code></a> |
796 |
|
represents an element type definition. Such a node implements the |
797 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
798 |
|
interface, which extends the <a href="#Node"><code>Node</code></a> |
799 |
|
interface.</p> |
800 |
|
|
801 |
|
<p>An element type definition represents a definition of the element type. |
802 |
|
It is corresponding to the element type declaration in <abbr>DTD</abbr>. |
803 |
|
However, an |
804 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> node |
805 |
|
does not represent the element type definition in <abbr>DTD</abbr> itself. |
806 |
|
Even if there are more than one element type declarations for an element type |
807 |
|
in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an |
808 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
809 |
|
node for that element type. In addition, if there are attribute definition |
810 |
|
declarations for an element type, even when there is no element type |
811 |
|
declaration for that element type, the <abbr>DOM</abbr> will contain an |
812 |
|
<a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
813 |
|
node for that element type.</p> |
814 |
|
|
815 |
<p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
<p>The <a href="#ElementTypeDefinition"><code>ElementTypeDefinition</code></a> |
816 |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
817 |
<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> { |
829 |
<div class=section id=section-attributedefinition> |
<div class=section id=section-attributedefinition> |
830 |
<h3>The <code>AttributeDefinition</code> Interface</h3> |
<h3>The <code>AttributeDefinition</code> Interface</h3> |
831 |
|
|
832 |
|
<p>The nodes of type |
833 |
|
<a href="#ATTRIBUTE_DEFINITION_NODE"><code>ATTRIBUTE_DEFINITION_NODE</code></a> |
834 |
|
represents an attribute definition. Such a node implements the |
835 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> interface, |
836 |
|
which extends the <a href="#Node"><code>Node</code></a> interface.</p> |
837 |
|
|
838 |
|
<p>An attribute definition represents a definition of the attribute |
839 |
|
associated to an element type. It is corresponding to the attribute definition |
840 |
|
in the attribute list declaration in <abbr>DTD</abbr>. However, an |
841 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node does |
842 |
|
not represent the attribute definition in <abbr>DTD</abbr> itself. Even if |
843 |
|
there are more than one attribute definitions for an attribute of an element |
844 |
|
type in <abbr>DTD</abbr>, the result <abbr>DOM</abbr> will contain only an |
845 |
|
<a href="#AttributeDefinition"><code>AttributeDefinition</code></a> node for |
846 |
|
that attribute.</p> |
847 |
|
|
848 |
<p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
<p>The <a href="#AttributeDefinition"><code>AttributeDefinition</code></a> |
849 |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
interface <em class=rfc2119>MUST</em> be implemented as following:</p> |
850 |
<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> { |
861 |
const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; |
const unsigned short <a href="#NOTATION_ATTR">NOTATION_ATTR</a> = 9; |
862 |
const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; |
const unsigned short <a href="#ENUMERATION_ATTR">ENUMERATION_ATTR</a> = 10; |
863 |
const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; |
const unsigned short <a href="#UNKNOWN_ATTR">UNKNOWN_ATTR</a> = 11; |
864 |
|
|
865 |
|
<span class=comment>// <a href="#DefaultValueType">DefaultValueType</a></span> |
866 |
|
const unsigned short <a href="#UNKNOWN_DEFAULT">UNKNOWN_DEFAULT</a> = 0; |
867 |
|
const unsigned short <a href="#FIXED_DEFAULT">FIXED_DEFAULT</a> = 1; |
868 |
|
const unsigned short <a href="#REQUIRED_DEFAULT">REQUIRED_DEFAULT</a> = 2; |
869 |
|
const unsigned short <a href="#IMPLIED_DEFAULT">IMPLIED_DEFAULT</a> = 3; |
870 |
|
const unsigned short <a href="#EXPLICIT_DEFAULT">EXPLICIT_DEFAULT</a> = 4; |
871 |
|
|
872 |
readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; |
readonly attribute <a href="#ElementTypeDefinition">ElementTypeDefinition</a> <a href="#ownerElementTypeDefinition">ownerElementTypeDefinition</a>; |
873 |
|
|