W3C

DOM Level 1 Specification Errata

May 1, 2000

This document:
http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html
The latest version of the DOM Level 1 specification:
http://www.w3.org/TR/REC-DOM-Level-1
This document records known errors in the document:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001

Please email error reports to www-dom@w3.org.

Known Errors

Introduction
The link to the CORBA 2.2 specification is broken. The correct address is http://www.omg.org/corba/corbaiiop.html.

Also, the first item of the list about "DOM Interfaces and DOM Implementations" has text about "read-only functions" which is meant to be "read-only attributes".

Section 1.1.5. The DOMString type
The DOMString type is defined as "a sequence of 16-bit quantities". Instead, it should be defined as "sequence of 16-bit units".

Then, the description contains the following sentences:

Please note that for both HTML and XML, the document character set (and therefore the notation of numeric character references) is based on UCS-4. A single numeric character reference in a source document may therefore in some cases correspond to two array positions in a DOMString (a high surrogate and a low surrogate).

It should read:

Please note that for both HTML and XML, the document character set (and therefore the notation of numeric character references) is based on UCS [ISO-10646]. A single numeric character reference in a source document may therefore in some cases correspond to two 16-bit units in a DOMString (a high surrogate and a low surrogate).
Section 1.1.6. Case sensitivity in the DOM
The first paragraph ends with the following:
For the purposes of the DOM, string matching takes place on a character code by character code basis, on the 16 bit value of a DOMString. As such, the DOM assumes that any normalizations will take place in the processor, before the DOM structures are built.

This sentence should read:

For the purposes of the DOM, string matching is performed purely by binary comparison of the 16-bit units of the DOMString. As such, the DOM assumes that any normalizations take place in the processor, before the DOM structures are built.
Section 1.2 Interface Attr
Setting the value attribute raises a NO_MODIFICATION_ALLOWED_ERR DOMException when the node is readonly.
Section 1.2 Interface CharacterData
The description of the length attribute reads:
The number of characters that are available through data and the substringData method below.

It should read:

The number of 16-bit units that are available through data and the substringData method below.

The description of the count parameter of the substringData method reads:

The number of characters to extract.

It should read:

The number of 16-bit units to extract.

Then the description of the return value reads:

The specified substring. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned.

It should read:

The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.

The exception INDEX_SIZE_ERR is said to be:

Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.

Instead this should read:

Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.

The description of the insertData method reads:

Insert a string at the specified character offset.

Instead it should read:

Insert a string at the specified 16-bit unit offset.

Then the description of the offset parameter reads:

The character offset at which to insert.

when it should read:

The 16-bit unit offset at which to insert.

The exception INDEX_SIZE_ERR is said to be:

Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.

Instead this should read:

Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.

The description of the deleteData method reads:

Remove a range of characters from the node.

Instead it should read:

Remove a range of 16-bit units from the node.

Then the description of the count parameter reads:

The number of characters to delete. If the sum of offset and count exceeds length then all characters from offset to the end of the data are deleted.

when it should read:

The number of 16-bit units to delete. If the sum of offset and count exceeds length then all 16-bit units from offset to the end of the data are deleted.

The description of the replaceData method reads:

Replace the characters starting at the specified character offset with the specified string.

instead it should read:

Replace the characters starting at the specified 16-bit unit offset with the specified string.

Then the description of the count parameter reads:

The number of characters to replace. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced

when it should read:

The number of 16-bit units to replace. If the sum of offset and count exceeds length, then all 16-bit units to the end of the data are replaced

The exception INDEX_SIZE_ERR is said to be:

Raised if the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.

Instead this should read:

Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
Section 1.2 Interface DOMImplementation
The definition of the version parameter reads:
in Level 1, this is the string "1.0"

This should read:

In Level 1, version 1.0, this is the string "1.0"
Section 1.2 Interface Document
The description of the createElement method is missing the following piece:
In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.

The description of the createEntityReference method is missing the following piece:

In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.

Section 1.2 Interface Element
The description reads:
the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element.

However, there is no getAttributes method per se, although it may exist in some language binding such as the java one. So this section should read:

the generic Node interface attribute attributes may be used to retrieve the set of all attributes for an element.

The removeAttribute method description reads:

If the removed attribute has a default value it is immediately replaced.

This should read:

If the removed attribute is known to have a default value, an attribute immediately appears containing the default value.
Section 1.2 Interface NamedNodeMap
The description of the return value of the removeNamedItem method reads:
The node removed from the map or null if no node with such a name exists.

But this error case is already handled by having the method to throw a NOT_FOUND_ERR DOMException. So this section should simply read:

The node removed from the map if a node with such a name exists.

The description of the removeNamedItem method should include the following note:

When this NamedNodeMap contains the attributes attached to an element, as returned by the attributes attribute of the Node interface, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value.

In addition, the removeNamedItem method should raise a NO_MODIFICATION_ALLOWED_ERR DOMException when the NamedNodeMap is readonly.

Section 1.2 Interface Text
The description offset parameter of the splitText method reads:
The offset at which to split, starting from 0.

when it should read:

The 16-bit unit offset at which to split, starting from 0.

The exception INDEX_SIZE_ERR is said to be:

Raised if the specified offset is negative or greater than the number of characters in data.

Instead this should read:

Raised if the specified offset is negative or greater than the number of 16-bit units in data.
Section 2.5.5 Interface HTMLBlockquoteElement
This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements.
Section 2.5.5 Interface HTMLInputElement
The description of the defaultValue attribute should read:
When the type attribute of the element has the value "Text", "File" or "Password", this represents the HTML value attribute of the element. The value of this attribute does not change if the contents of the corresponding form control in an interactive user agent changes. Changing this attribute, however, resets the contents of the form control. See the value attribute definition in HTML 4.0.
The description of the value attribute should read:
When the type attribute of the element has the value "Text", "File" or "Password", this represents the current contents of the corresponding form control in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the value of the HTML value attribute of the element. When the type attribute of the element has the value "Button", "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this represents the HTML value attribute of the element. See the value attribute definition in HTML 4.0.
The description of the defaultChecked attribute should read:
When the type attribute of the element has the value "Checkbox" or "Radio", this represents the HTML checked attribute of the element. The value of this attribute does not change if the state of the corresponding form control in an interactive user agent changes. Changes to this attribute, however, resets the state of the form control. See the checked attribute definition in HTML 4.0.
The description of the checked attribute should read:
When the type attribute of the element has the value "Checkbox" or "Radio", this represents the current state of the corresponding form control in am interactive user agent. Changes to this attribute changes the state of the form control, but does not change the value of the HTML value attribute of the element.
Section 2.5.5 Interface HTMLOptionElement
The description of the defaultSelected attribute should read:
Represents the value of the HTML selected attribute. The value of this attribute does not change if the state of the corresponding form control in an interactive user agent changes. Changing defaultSelected, however, resets the state of the form control. See the selected attribute definition in HTML 4.0.
The description of the selected attribute should read:
Represents the current state of the corresponding form control in an interactive user agent. Changing this attribute changes the state of the form control, but does not change the value of the HTML selected attribute of the element.
The index attribute actually is readonly. On the other hand, the selected attribute is not.
Section 2.5.5 Interface HTMLSelectElement
The value of the type attribute is the string "select-multiple" when the multiple attribute is true and the string "select-one" when false.
The description of the before parameter of the add method reads:
The element to insert before, or null for the head of the list.

Instead it should read:

The element to insert before, or null for the tail of the list.
Section 2.5.5 Interface HTMLTableElement
The description of the index parameter of the insertRow and deleteRow methods is missing the following:
This index starts from 0 and is relative to all the rows contained inside the table, regardless of section parentage.

In addition, the description of the insertRow method is missing the following:

The new row is inserted immediately before and in the same section as the current indexth row in the table. If index is equal to the number of rows, the new row is appended.
In addition, when the table is empty the row is inserted into a TBODY which is created and inserted into the table.
Section 2.5.5 Interface HTMLTableSectionElement
The description of the index parameter of the insertRow and deleteRow methods is missing the following:
This index starts from 0 and is relative only to the rows contained inside this section, not all the rows in the table.
Section 2.5.5 Interface HTMLTableCellElement
The cellIndex attribute actually is readonly.
Section 2.5.5 Interface HTMLTableRowElement
The rowIndex, selectionRowIndex, and cells attributes actually are readonly.
Section 2.5.5 Interface HTMLTextArea
The value of the type attribute is the string "textarea".
The description of the defaultValue attribute should read:
Represents the contents of the element. The value of this attribute does not change if the contents of the corresponding form control in an interactive user agent changes. Changing this attribute, however, resets the contents of the form control.
The description of the value attribute should read:
Represents the current contents of the corresponding form control in an interactive user agent. Changing this attribute changes the contents of the form control, but does not change the contents of the element.
Appendix C: IDL Definition
The list of exception codes appears twice and several pieces of information, such as the names and prefixes of the modules are missing. The archive http://www.w3.org/DOM/updates/REC-DOM-Level-1-idl-19990107.zip contains an improved definition of the DOM in IDL.
Appendix D: Java Language Binding
The java source files in the archive http://www.w3.org/DOM/updates/REC-DOM-Level-1-java-binding-19990107.zip contain the copyright notice appropriate for people to use them in their products. A few errors in the javadoc part of them have also been fixed.
In addition, the javadoc files contained in the original java-binding.zip file are out of date. You can either rebuild them from the java source files contained in the above archive or get them from http://www.w3.org/DOM/updates/REC-DOM-Level-1-javadoc-19990107.zip, which also contains the missing images.
References
The URI of the ECMAScript Language Specification is now http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM.

Minor typographical errors

Section 1.1.5. The DOMString type
The Note in the second list item reads:
Even though the DOM defines the name of the string type to be DOMString, bindings may used different names.

It should read "use" instead of "used".