DocumentXDoctype Interface Specification[1] manakai//DOM Extensions > New Interfaces >
DOM XML Document Type Definition module >
The DocumentXDoctype Interface
[3] The
createDocumentTypeDefinition method
returns a DocumentType node
or raises a DOMException.
It creates a DocumentType node
of the given name, belonging to the document.
[3] The
createElementTypeDefinition method
returns an ElementTypeDefinition node
or raises a DOMException.
It creates an ElementTypeDefinition node
of the given name, belonging to the document.
[4] The
createAttributeDefinition method
returns an AttributeDefinition node
or raises a DOMException.
It creates an AttributeDefinition node
of the given name, belonging to the document.
[10] The
createGeneralEntity method
returns an Entity node
or raises a DOMException.
It creates an Entity node,
which represents a general entity,
of the given name, belonging to the document.
[12] The
createNotation method
returns a Notation node
or raises a DOMException.
It creates a Notation node
of the given name, belonging to the document.
[5]
These method take a parameter name,
of type DOMString. It is
the document type name, element type name,
or attribute name of the node to be created.
[6]
The createDocumentTypeDefinition
method MUST create a DocumentType
object with the following attribute values:
attributes,
parentNode: null.elementTypes,
generalEntities,
notations: Empty
NamedNodeMaps.childNodes: An empty
NodeList.entities: The same
NamedNodeMap as
generalEntities.internalSubset,
publicId, systemId:
Empty strings.manakaiReadOnly:
false.nodeName: name.ownerDocument: The
Document node on which the method
is invoked.In addition, it MUST be marked as containing
five general entity declarations for XML predefined
entities, i.e. amp, lt,
gt, quot, and
apos.
[8]
The createElementTypeDefinition
method MUST create an
ElementTypeDefinition
object with the following attribute values:
attributeDefinitions:
An empty NamedNodeMap.attributes,
parentNode: null.childNodes: An empty
NodeList.manakaiReadOnly:
false.nodeName: name.ownerDocument: The
Document node on which the method
is invoked.ownerDocumentTypeDefinition:
null.[9] The createAttributeDefinition
method MUST create an
AttributeDefinition
object with the following attribute values:
allowedTokens:
An empty DOMStringList.attributes,
parentNode: null.childNodes: An empty
NodeList.declaredType:
NO_TYPE_ATTR.defaultType:
UNKNOWN_DEFAULT.manakaiReadOnly:
false.nodeName: name.ownerDocument: The
Document node on which the method
is invoked.ownerElementTypeDefinition:
null.declaredType
attribute is set to
<C::AttributeDefinition.ID_ATTR>.
defaultType?[11] The createGeneralEntity
method MUST create an Entity
node with the following attribute values:
attributes,
parentNode: null.childNodes: An empty
NodeList.manakaiDeclarationBaseURI:
No explicit value is set.manakaiEntityBaseURI:
No explicit value is set.manakaiEntityURI:
No explicit value is set.manakaiHasReplacementTree:
false.manakaiReadOnly:
false.nodeName: name.notationName: null.ownerDocument: The
Document node on which the method
is invoked.ownerDocumentTypeDefinition:
null.publicId: null.systemId: null.[13] The createNotation
method MUST create a Notation
node with the following attribute values:
attributes,
parentNode: null.childNodes: An empty
NodeList.manakaiDeclarationBaseURI:
No explicit value is set.manakaiReadOnly:
false.nodeName: name.ownerDocument: The
Document node on which the method
is invoked.ownerDocumentTypeDefinition:
null.publicId: null.systemId: null.[7]
These method MUST raise an
INVALID_CHARACTER_ERR
DOMException
if the name is not a legal
name according to the XML version in use as
specified in the xmlVersion
attribute of the Document node.
name does not have to
be a namespace qualified name.name parameter value
to match to the name of one of predefined general
parsed entities in XML or HTML.strictErrorChecking attribute
is set to false, then the implementation
is not required to raise this exception.Otherwise, these method MUST return the newly created node.