Conventions

[32]
An InterfaceName object refers to
an object that implements InterfaceName interface.
Note that the object might also implement other
interfaces than InterfaceName.
However, unless explicitly specified, the term
Text object does
not refer to a CDATASection object
though the CDATASection interface
extends the Text interface.

[33]
When a CONSTANT_NAMEExceptionInterfaceName
is said to be thrown, an implementation MUST
throw an exception object that implements the
ExceptionInterfaceName interface and
whose code attribute is set
to the value of CONSTANT_NAME.

[34]
Algorithms shown in this document does not intend
to constraint the way to implement that feature.
Implementations are always free to implement that
feature in any way as long as that has the same
effect as the normative algorithm.

Extensions to existing interfaces

Backward compatibility

[64] It MUST implement the definitions in the DOM Standard but commented out with
markers "AttrExodus" or "NodeExodus". DOM

[65] This is a willful violation to the DOM Standard that is intended to
obsolete them. Since manakai is a Perl implementation of DOM, it has different
compatibility requirements from those in Web browsers.

The namespaceURI parameter
is a DOMString.
It represents the namespace URI of the element type
to test.
Both null and an empty string
represents the null namespace as in the
namespaceURI parameters
of other similar methods.

The localName parameter
is a DOMString.
It represents the local name of the element type to test.

Values contained in the DOMStringListDOMString[] object
returned by this attribute might not be a valid ID; for example,
it might be the empty string, or there are another element with
same ID in the earlier part of the document in tree order.

The order in which strings are listed in the DOMStringListDOMString[]
object depends on the order of the Attr nodes
in the attributes attribute. In other word,
the order is implementation dependent but is stable in a specific
implementation.

The type of this attribute is DOMStringList.
This attribute is read-only.

On setting, if the Attr is read-only,
then an NO_MODIFICATION_ALLOWED_ERR
exception MUST be thrown. Otherwise,
the flag that represents whether the Attr
is a user-determined ID attribute or not MUST
be set to the new value.

Setting false to this attribute
does not make the Attr
non-ID if the Attr
is marked as an ID by other
mean than the user-determined ID flag,
e.g. by DTD attribute definition.

Attribute type accessor

The type of this attribute is unsigned short.
This attribute is read-write.

This attribute corresponding to the
attribute type property
of an attribute information item in the XML Information Set.

The getter MUST return the declared
type of the Attr.
It is expected that a constant in the
DeclaredValueType constant group
is returned. If no declared type is explicitly set,
then NO_TYPE_ATTRMUST be returned.

On setting, if the Attr is read-only,
then an NO_MODIFICATION_ALLOWED_ERR
exception MUST be thrown. Otherwise,
the new value MUST be set as
the attribute value. It is expected that a constant in the
DeclaredValueType constant group
is set to the attribute, though it is not checked
by the attribute.

The setter MUST throw a
NO_MODIFICATION_ALLOWED_ERRDOMException if the
Node object is read-only.
Otherwise, it MUST set the specified value
to the attribute. No normalization, lexical validation,
or relative reference resolving is performed.
null, which represents no public or
system identifier is provided, might be specified.

Setting public or system identifier does never result
in any lexical or logical structure of the
document being changed. In particular, no external
entity referenced by new identifier will be loaded.

Setting an invalid or non-normalized identifier
might make the object non-serializable. Setting
a non-null public identifier to a DocumentType or
Entity object that does not have
non-null system identifier or
setting null as the system identifier
of a DocumentType or
Entity object that does have
non-null public identifier will
make that object non-serializable.

ISSUE: In HTML5, Firefox 1.5, and Opera 9, not specifying
public or system identifier results in empty strings.

It is the base URI of the document type declaration
if the DocumentType object comes
from an XML document entity and can be used to
resolve relative DOM URI specified to the
systemId attribute of
the DocumentType object.

This attribute is read-write.
The type of this attribute is DOMString.

The getter MUST return the declaration base
DOM URI. If there is no explicit declaration base URI
information attached to the Node object,
then the base URI of the Node object,
i.e. the baseURI attribute value
of the Node object, MUST
be returned.

Note that if there is no explicit base URI information
attached to the Node object and
the baseURI attribute of that
object is null, then the value
of this attribute is also null.

The setter MUST throw a
NO_MODIFICATION_ALLOWED_ERRDOMException if the
Node object is read-only.
Otherwise, it MUST set the specified value
as the declaration base DOM URI of the Node
object. The specified value must be an absolute DOM URI.
However, no lexical validation or relative reference resolution
is performed on setting. In addition, it does not affect
on the value of systemId attribute,
the replacement subtree of the Entity
object, nor any of entity reference or notation
attribute in the document.

If null is specified, the
declaration base DOM URI of the Node
is unset. It does not affect to the baseURI
attribute.

The setter MUST throw a
NO_MODIFICATION_ALLOWED_ERRDOMException if the object
is read-only. Otherwise, if the specified value
is null, it MUST unset
the explicit entity base URI specification for the object.
Otherwise, it MUST set the specified value
as the entity base URI of the object.

The specified value must be an absolute DOM URI.
However, no lexical validation or relative reference
resolution is performed on the setting. Likewise,
setting the value does not affect on the entity base
URI of any EntityReference
object whose nodeName,
publicId, or
systemId is same as the
Entity object's.
The exception is the nodes in the subtree rooted by the
Entity object, where the new
base URI might affect the base URIs of those objects.

It might or might not be equal to the DOM URI
contained in the systemId attribute
of the object or the absolute URI obtained by
resolving systemId attribute
against manakaiDeclarationBaseURI
attribute of the object. In particular, in case
a catalog mechanism is used or a redirection is
encountered during the entity resolution phase of the
parsing, the entity URI is typically different from
the one specified as the system identifier.

ISSUE: Security concern - in scripted implementation,
it might be inappropriate to leak a URI of catalog-resolved
entity.

The getter MUST return the DOM URI of the entity
obtained by the following algorithm:

If the DOM URI of the entity represented by the object
is explicitly set by application or during the tree
construction, then return it.

Otherwise, if the systemId attribute
of the object contains a non-null value,
then return the value, resolved against the
manakaiDeclarationBaseURI attribute
value if the value is not an absolute DOM URI and
that attribute value is not null.

The setter MUST throw a
NO_MODIFICATION_ALLOWED_ERRDOMException if the object
is read-only. Otherwise, if the specified value
is null, it MUST unset
the explicit entity URI specification for the object.
Otherwise, it MUST set the specified value
as the entity URI of the object.

The specified value must be an absolute DOM URI.
However, no lexical validation or relative reference
resolution is performed on the setting. Likewise,
setting the value does not affect on the entity base
URI of any EntityReference
object whose nodeName,
publicId, or
systemId is same as the
Entity object's.
The exception is the nodes in the subtree rooted by the
Entity object, where the new
base URI might affect the base URIs of those objects.

TODO: We need to define the exact way to
get absolute DOM URI from a relative DOM URI.
(And "http://www.example.com/a/../b/" is normalized or not.)

ISSUE: Should we provide an attribute that
contains the absolute URI representation of
the system id?

If a parser create a Entity object
that represents a general entity, it set the value
of this attribute. If it set this attribute as
false, then it MUST
make the child list of the Entity
object empty.

An application might set this attribute as
false even if the
Entity object has child nodes.
If the value of this attribute is false,
any child of the Entity object
should be ignored for the purpose of e.g. serialization.

When an EntityReference object
is created and then the subtree of the
Entity object is cloned to
that object, any child node MUST be
ignored if the attribute is set to false.

The setter perform no lexical validation of the new
value. The new notation name might not
be an XML Name and therefore the object might become
non-serializable. In a well-formed XML document,
unparsed entities have notation names and parsed entities
do not. However, setting new value to the attribute
might break this rule and the result document might
be inconsistent.

[120] When an Entity object is created in the process of parsing the XML document,
if the entity is externally declared XML, the externally declared flag of the object
MUST set. Otherwise the flag MUST be unset initially.

If a parser create a EntityReference object
that represents a general entity reference, it set the value
of this attribute. If it set this attribute as
false, then it MUST
make the child list of the EntityReference
object empty.

An application might set this attribute as
false even if the
EntityReference object has child nodes.
If the value of this attribute is false,
any child of the EntityReference object
should be ignored for the purpose of e.g. serialization.

Therefore, the entity base URI for internal general
entities are same as the base URI for the external
or document entity in which the entity is referenced,
unless explicitly overridden later by application.

The specified value must be an absolute DOM URI.
However, no lexical validation or relative reference
resolution is performed on the setting. Likewise,
setting the value does not affect on the entity base
URI of any Entity object
and any other EntityReference
object whose nodeName,
publicId, or
systemId is same as
EntityReference object's.

Setting null to this attribute
removes the explicit entity base URI information
attached to the EntityReference
object entirely and never restores the original
entity base URI set during the tree construction,
if any. To synchronize entity base URI with that
of the Entity objecet with
same name attribute,
use normalizeDocument method
on the Document.

For the purpose of this method, a WebVTT file is invalid if it does
not contain the WebVTT signature such that the WebVTT parser does not
continue to parse the file. Any other conformance error does not cause
the attribute return true.

[61] The manakaiAllCues attribute of the
TextTrack object, on getting, MUST
return the live list that contains the cues found in the track,
whether active or not, or effective or not.

[111] Attributes uriScheme, uriAuthority,
uriUserinfo, uriHost,
uriPort, uriPath,
uriQuery, and uriFragment corresponding to
scheme, authority, userinfo, hostname, port, path, query, and fragment components respectively.
On getting, these attributes MUST return the corresponding component of the url
of the context object, not including delimiters before or after the component, if any, or
null otherwise.
On setting, these attributes MUST replace the corresponding component by the new value,
if the new value is syntactically sound value as that component, or do nothing, otherwise.

Need more precious definition.

[112] The getURIPathSegment method of the URIReference
object MUST return the path segment of the url of the context object with the index
specified as the argument. The path segments of the URL is the components of the path separated by a
/ character. If the path segment with the specified index is not found,
nullMUST be returned instead.

[113] The setURIPathSegment method of the URIReference
object MUST set the path segment of the url of the context object with the index
specified by the first argument MUST be replaced or added by the value specified
as the second argument. If the index is greater than the number of path segments, the path
segments with indexes greater than or equal to the number of the path segments and less than
the specified index MUST be set to the empty string.

Loose document children

Note that this configuration parameter does
affect operations only after it is set.
Changing the configuration parameter value
itself does not mutate the underlying document tree
even if the tree violate the rule applied under
the new value.

[176] The getItems method MUST return the node list containing elements
that create top-level microdata items in the subtree rooted by the context object (inclusive).
The method MUST return a static node list.

[170] The manakaiLookupNamespaceURI method of the CSSStyleSheet
interface MUST return the namespace name of the namespace prefix specified by the argument, if any,
or null otherwise. If there are multiple @namespace at-rules in the style sheet,
only the last one takes effect by definition. If the argument is the empty string, namespace name
of the default namespace, if any, is returned instead.

[171] The manakaiLookupNamespacePrefix method of the CSSStyleSheet
interface MUST return the namespace prefix bound to the namespace which is equal to the argument, if any,
or null otherwise. If there are more than one namespace prefixes bound to the namespace, the namespace prefix
declared later in the list of rules in the style sheet MUST be returned. Note that any
@namespace at-rules with no prefix is ignored for the purpose of this method.

[142] The node has a strong reference to each of user data and user data handler associated with
the node using the setUserData method until they has been removed from the node
by another invocation of the method with the same name argument.

[157] For the purpose of the media IDL attribute, the attribute has no default value.

Implementation-specific requirements

[155] When a method on an object may or may not return the same NodeList or
HTMLCollection object as returned by the earlier calls, then the same object
MUST be returned.

[138] If an operation is defined in terms of the XML version of the document or the
xmlVersion attribute value but its behavior on occurrence of unknown XML version
is not defined, it MUST behave as if the XML version is 1.0.

- If they are <IF::ATDef>s, the <A::ATDef.allowedToken><IF::c|DOMStringList>s are equal, i.e. they have
the same <A::c|DOMStringList.length> and for each string
that exists in one list there is a string that
exists in the other list and is equal, although
not necessarily at the same index. In addition,
the number of the items that are equal to a string in one list
is equal to the number of such items in the other list.