manakai//DOM Extensions > 
DOM XML Document Type Definition module > 
The AttributeDefinition interface
Node members[3] The getter of the attributes attribute
of an AttributeDefinition object
MUST return null.
[9] The getter of the baseURI attribute
of an AttributeDefinition object
MUST return the baseURI
of the ownerDocument of the
AttributeDefinition object.
Note that it might be null.
[1] The getter of the nodeName attribute
of an AttributeDefinition object
MUST return the name of the attribute.
[2] The getter of the nodeValue attribute
of an AttributeDefinition object
MUST return the normalized default value
of the attribute.
[4] The getter of the textContent
attribute of an AttributeDefinition 
object MUST behave as if it were an
Attr object.
The setter of the textContent attribute
of an AttributeDefinition object
MUST behave as if the following algorithm
is performed:
AttributeDefinition
object is read-only, then throw an
NO_MODIFICATION_ALLOWED_ERR.null,
then create a Text node
whose data is the new value
and append it to the AttributeDefinition.[6] The
definition group DeclaredValueType
contains integers indicating the type of 
attribute value:
| NO_TYPE_ATTR | 0 | The attribute value type corresponding to no value in XML Information Set. | 
| CDATA_ATTR | 1 | The attribute value type is CDATA. | 
| ID_ATTR | 2 | The attribute value type is ID. | 
| IDREF_ATTR | 3 | The attribute value type is IDREF. | 
| IDREFS_ATTR | 4 | The attribute value type is IDREFS. | 
| ENTITY_ATTR | 5 | The attribute value type is ENTITY. | 
| ENTITIES_ATTR | 6 | The attribute value type is ENTITIES. | 
| NMTOKEN_ATTR | 7 | The attribute value type is NMTOKEN. | 
| NMTOKENS_ATTR | 8 | The attribute value type is NMTOKENS. | 
| NOTATION_ATTR | 9 | The attribute value type is NOTATION. | 
| ENUMERATION_ATTR | 10 | The attribute value is enumeration type. | 
| UNKNOWN_ATTR | 11 | The attribute value type is unknown, because no declaration for the attribute has been read but not all declarations processedproperty would be false. | 
The type of these constants are 
unsigned short.
If no attribute type information is provided,
or if the source of that information does not 
distinguish no value and unknown as in
XML Information Set, then the 
NO_TYPE_ATTR value 
MUST be used.
If the source of the attribute type information
does not distinguish no value and / or unknown
and CDATA, then the
CDATA_ATTR value MUST
be used.
[11]
In Perl binding, the objects implementing the 
Attr interface MUST
also implement the DeclaredValueType
constant group.
[7] The
definition group DefaultValueType
contains integers indicating the type of 
default attribute value:
| UNKNOWN_DEFAULT | 0 | The default value is unknown. | 
| FIXED_DEFAULT | 1 | The default value is provided and the attribute is #FIXEDto that value. | 
| REQUIRED_DEFAULT | 2 | An attribute specification is #REQUIREDfor the attribute. | 
| IMPLIED_DEFAULT | 3 | The default value is #IMPLIED. | 
| EXPLICIT_DEFAULT | 4 | The default value is provided but the attribute is not fixed to it. | 
The type of these constants are 
unsigned short.
If the source of the attribute default value type
does not distinguish the #IMPLIED
default and unknown default, then the 
IMPLIED_DEFAULT value
MUST be used.
AttributeDefinition
object by createAttributeDefinition
method has declaredType attribute
set to NO_TYPE_ATTR.[10] 
The 
ownerElementTypeDefinition attribute
of the AttributeDefinition interface
is read-only and of type 
ElementTypeDefinition.
It is the ElementTypeDefinition node
which the AttributeDefinition node
belong to.
If the AttributeDefinition node
is included in the attributeDefinitions
list of an ElementTypeDefinition node,
then the attribute MUST return the
ElementTypeDefinition node.
Otherwise, it MUST return null.
ownerDocumentTypeDefinition attribute
for ElementTypeDefinition,
Entity, and Notation
nodes, or the ownerElement
attribute for Attr nodes.[5]
The declaredType attribute
of an AttributeDefinition object 
represents the type of the attribute value.
This attribute is read-write.
The type of the attribute is 
unsigned short.  It is expected 
that this attribute has a value from the definition group
DeclaredValueType.
The getter MUST return a value associated to this attribute.
The setter MUST
throw a NO_MODIFICATION_ALLOWED_ERR
DOMException if the 
AttributeDefinition object is read-only.
Otherwise, the setter MUST set the specified
value as the value associated to this attribute.
If a parser create an AttributeDefinition
object, then it MUST set a value 
from the DeclaredValueType 
definition group.
[8]
The defaultType attribute
of an AttributeDefinition object 
represents the type of the attribute default value.
This attribute is read-write.
The type of the attribute is 
unsigned short.  It is expected 
that this attribute has a value from the definition group
DefaultValueType.
The getter MUST return a value associated to this attribute.
The setter MUST
throw a NO_MODIFICATION_ALLOWED_ERR
DOMException if the 
AttributeDefinition object is read-only.
Otherwise, the setter MUST set the specified
value as the value associated to this attribute.
If a parser create an AttributeDefinition
object, then it MUST set a value 
from the DefaultValueType 
definition group.
AttributeDefinitionobject bycreateAttributeDefinitionmethod hasdeclaredTypeattribute set toNO_TYPE_ATTR.