Checking in Sources/Docs of DOM Level 2 from :

http://www.w3.org/DOM/DOMTM


git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dims committed 2001-06-01 11:15:37 +00:00
1 parent 7d5c881d20
commit 82b88df622
231 files changed
+66110

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<div1 role="acknowledgements" id="contributors">
<head>Acknowledgements</head>
<p>Many people contributed to this specification, including members of the
DOM Working Group and the DOM Interest Group. We especially thank the
following:</p>
<p> Lauren Wood (SoftQuad Software Inc., <emph>chair</emph>), Andrew Watson
(Object Management Group), Andy Heninger (IBM), Arnaud Le Hors (W3C and IBM),
Ben Chang (Oracle), Bill Smith (Sun), Bill Shea (Merrill Lynch), Bob Sutor
(IBM), Chris Lovett (Microsoft), Chris Wilson (Microsoft), David Brownell
(Sun), David Singer (IBM), Don Park (invited), Eric Vasilik (Microsoft), Gavin
Nicol (INSO), Ian Jacobs (W3C), James Clark (invited), James Davidson (Sun),
Jared Sorensen (Novell), Joe Kesselman (IBM), Joe Lapp (webMethods), Joe Marini
(Macromedia), Johnny Stenback (Netscape), Jonathan Marsh (Microsoft), Jonathan
Robie (Texcel Research and Software AG), Kim Adamson-Sharpe (SoftQuad Software
Inc.), Laurence Cable (Sun), Mark Davis (IBM), Mark Scardina (Oracle), Martin
D&#252;rst (W3C), Mick Goulish (Software AG), Mike Champion (Arbortext and Software
AG), Miles Sabin (Cromwell Media), Patti Lutsky (Arbortext), Paul Grosso
(Arbortext), Peter Sharpe (SoftQuad Software Inc.), Phil Karlton (Netscape),
Philippe Le H&eacute;garet (W3C, <emph>W3C team contact</emph>), Ramesh
Lekshmynarayanan (Merrill Lynch), Ray Whitmer (iMall, Excite@Home and
Netscape), Rich Rollman (Microsoft), Rick Gessner (Netscape), Scott Isaacs
(Microsoft), Sharon Adler (INSO), Steve Byrne (JavaSoft), Tim Bray (invited),
Tom Pixley (Netscape), Vidur Apparao (Netscape), Vinod Anupam (Lucent). </p>
<p>Thanks to all those who have helped to improve this specification by
sending suggestions and corrections.</p>
<div2 id="Productions"><head>Production Systems</head>
<p>This specification was written in XML. The HTML, OMG IDL, Java and ECMA
Script bindings were all produced automatically.</p>
<p>Thanks to Joe English, author of
<loc href="http://www.flightlab.com/cost">cost</loc>, which was used as
the basis for producing DOM Level 1. Thanks also to Gavin Nicol, who wrote the
scripts which run on top of cost. Arnaud Le Hors and Philippe Le H&eacute;garet
maintained the scripts.</p>
<p>For DOM Level 2, we used
<loc href="http://xml.apache.org/xerces-j">Xerces</loc> as the basis DOM
implementation and wish to thank the authors. Philippe Le H&eacute;garet and Arnaud
Le Hors wrote the
<loc
href="http://dev.w3.org/cvsweb/java/classes/org/w3c/tools/specgenerator/">Java
programs</loc> which are the DOM application.</p>
<p>Thanks also to Jan K&#228;rrman, author of
<loc href="http://www.tdb.uu.se/~jan/html2ps.html">html2ps</loc>, which
we use in creating the PostScript version of the specification.</p>
</div2></div1>
+216
View File
@@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF COPYRIGHT NOTICE *
*************************************************************************
-->
<div1 id="Copyright-Notice">
<head>Copyright Notice</head>
<p role='important'>
Copyright &copy; &date.year; <loc href="http://www.w3.org/">World Wide Web
Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights Reserved.
</p>
<p>
This document is published under the <specref
ref="Copyright-notice-document"/>. The bindings within this document are
published under the <specref ref="Copyright-notice-software"/>. The
software license requires "Notice of any changes or modifications to the
W3C files, including the date changes were made." Consequently, modified
versions of the DOM bindings must document that they do not conform to the
W3C standard; in the case of the IDL definitions, the pragma prefix can no
longer be 'w3c.org'; in the case of the Java Language binding, the package
names can no longer be in the 'org.w3c' package.
</p>
<div2 id="Copyright-notice-document">
<head>W3C Document Copyright Notice and License</head>
<note>
<p>
This section is a copy of the W3C Document Notice and License and could
be found at <loc
href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">http://www.w3.org/Consortium/Legal/copyright-documents-19990405</loc>.
</p>
</note>
<p role='important'>
Copyright &copy; 1994-&date.year; <loc href="http://www.w3.org/">World
Wide Web Consortium</loc>, (<loc
href="http://www.lcs.mit.edu/">Massachusetts Institute of
Technology</loc>, <loc href="http://www.inria.fr/">Institut National de
Recherche en Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
Reserved.
</p>
<p role='important'>
http://www.w3.org/Consortium/Legal/
</p>
<p>
Public documents on the W3C site are provided by the copyright holders
under the following license. The software or Document Type Definitions
(DTDs) associated with W3C specifications are governed by the <loc
href="http://www.w3.org/Consortium/Legal/copyright-software.html">Software
Notice</loc>. By using and/or copying this document, or the W3C document
from which this statement is linked, you (the licensee) agree that you
have read, understood, and will comply with the following terms and
conditions:
</p>
<p>
Permission to use, copy, and distribute the contents of this document, or
the W3C document from which this statement is linked, in any medium for
any purpose and without fee or royalty is hereby granted, provided that
you include the following on <emph>ALL</emph> copies of the document, or
portions thereof, that you use:
</p>
<olist>
<item>
<p>
A link or URL to the original W3C document.
</p>
</item>
<item>
<p>
The pre-existing copyright notice of the original author, or if it
doesn't exist, a notice of the form: &quot;Copyright &copy;
[$date-of-document] <loc href="http://www.w3.org/">World Wide Web
Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</loc>, <loc
href="http://www.inria.fr/">Institut National de Recherche en
Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/&quot; (Hypertext is
preferred, but a textual representation is permitted.)
</p>
</item>
<item>
<p>
<emph>If it exists</emph>, the STATUS of the W3C document.
</p>
</item>
</olist>
<p>
When space permits, inclusion of the full text of this <emph
role='important'>NOTICE</emph> should be provided. We request that
authorship attribution be provided in any software, documents, or other
items or products that you create pursuant to the implementation of the
contents of this document, or any portion thereof.
</p>
<p>
No right to create modifications or derivatives of W3C documents is
granted pursuant to this license. However, if additional requirements
(documented in the <loc
href="http://www.w3.org/Consortium/Legal/IPR-FAQ.html">Copyright
FAQ</loc>) are satisfied, the right to create modifications or
derivatives is sometimes granted by the W3C to individuals complying with
those requirements.
</p>
<p>
THIS DOCUMENT IS PROVIDED &quot;AS IS,&quot; AND COPYRIGHT HOLDERS MAKE
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT
ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH
CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
</p>
<p>
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.
</p>
<p>
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to this document or its contents
without specific, written prior permission. Title to copyright in this
document will at all times remain with copyright holders.
</p>
</div2>
<div2 id="Copyright-notice-software">
<head>W3C Software Copyright Notice and License</head>
<note>
<p>
This section is a copy of the W3C Software Copyright Notice and License
and could be found at <loc
href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">http://www.w3.org/Consortium/Legal/copyright-software-19980720</loc>
</p>
</note>
<p role='important'>
Copyright &copy; 1994-&date.year; <loc href="http://www.w3.org/">World
Wide Web Consortium</loc>, (<loc
href="http://www.lcs.mit.edu/">Massachusetts Institute of
Technology</loc>, <loc href="http://www.inria.fr/">Institut National de
Recherche en Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
Reserved.
</p>
<p role='important'>
http://www.w3.org/Consortium/Legal/
</p>
<p>
This W3C work (including software, documents, or other related items) is
being provided by the copyright holders under the following license. By
obtaining, using and/or copying this work, you (the licensee) agree that
you have read, understood, and will comply with the following terms and
conditions:
</p>
<p>
Permission to use, copy, and modify this software and its documentation,
with or without modification, for any purpose and without fee or royalty
is hereby granted, provided that you include the following on ALL copies
of the software and documentation or portions thereof, including
modifications, that you make:
</p>
<olist>
<item>
<p>The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.</p>
</item>
<item>
<p>
Any pre-existing intellectual property disclaimers. If none exist,
then a notice of the following form: "Copyright &copy;
[$date-of-software] <loc href="http://www.w3.org/">World Wide Web
Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</loc>, <loc
href="http://www.inria.fr/">Institut National de Recherche en
Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/."
</p>
</item>
<item>
<p>
Notice of any changes or modifications to the W3C files, including
the date changes were made. (We recommend you provide URIs to the
location from which the code is derived.)
</p>
</item>
</olist>
<p>
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
</p>
<p>
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.
</p>
<p>
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific,
written prior permission. Title to copyright in this software and any
associated documentation will at all times remain with copyright holders.
</p>
</div2>
</div1>
<!--
*************************************************************************
* END OF COPYRIGHT NOTICE *
*************************************************************************
-->
+130
View File
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<div1 id="Changes">
<head>Changes</head>
<orglist role="editors">
<member>
<name>Arnaud Le Hors</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
</orglist>
<div2 id="DOMLevel1to2Changes">
<head>Changes between DOM Level 1 Core and DOM Level 2 Core</head>
<glist>
<gitem>
<label>OMG IDL</label>
<def><p>The DOM Level 2 specifications are now using Corba 2.3.1
instead of Corba 2.2.</p>
</def>
</gitem>
<gitem>
<label>Type <code>DOMString</code></label>
<def><p>The definition of <code>DOMString</code> in IDL is now a
<code>valuetype</code>.</p>
</def>
</gitem>
</glist>
<div3 id="DOMLevel1Changes">
<head>Changes to DOM Level 1 Core interfaces and exceptions</head>
<glist>
<gitem>
<label>Interface <code>Attr</code></label>
<def><p>The <code>Attr</code> interface has one new
attribute: <code>ownerElement</code>.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>Document</code></label>
<def><p>The <code>Document</code> interface has five new methods:
<code>importNode</code>, <code>createElementNS</code>,
<code>createAttributeNS</code>, <code>getElementsByTagNameNS</code>
and <code>getElementById</code>.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>NamedNodeMap</code></label>
<def><p>The <code>NamedNodeMap</code> interface has three new
methods: <code>getNamedItemNS</code>, <code>setNamedItemNS</code>,
<code>removeNamedItemNS</code>.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>Node</code></label>
<def><p>The <code>Node</code> interface has two new
methods: <code>isSupported</code> and <code>hasAttributes</code>.</p><p><code>normalize</code>, previously
in the <code>Element</code> interface, has been
moved in the <code>Node</code> interface.</p>
<p>The <code>Node</code> interface has three new attributes:
<code>namespaceURI</code>, <code>prefix</code> and
<code>localName</code>.</p>
<p>The <code>ownerDocument</code> attribute was specified to be
<code>null</code> when the node is a <code>Document</code>. It
now is also <code>null</code> when the node is a
<code>DocumentType</code> which is not used with any
<code>Document</code> yet.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>DocumentType</code></label>
<def><p>The <code>DocumentType</code> interface has three attributes:
<code>publicId</code>, <code>systemId</code> and
<code>internalSubset</code>.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>DOMImplementation</code></label>
<def><p>The <code>DOMImplementation</code> interface has two new
methods: <code>createDocumentType</code> and
<code>createDocument</code>.</p>
</def>
</gitem>
<gitem>
<label>Interface <code>Element</code></label>
<def><p>The <code>Element</code> interface has eight new
methods: <code>getAttributeNS</code>,
<code>setAttributeNS</code>, <code>removeAttributeNS</code>,
<code>getAttributeNodeNS</code>, <code>setAttributeNodeNS</code>,
<code>getElementsByTagNameNS</code>, <code>hasAttribute</code>
and <code>hasAttributeNS</code>.</p>
<p>The method <code>normalize</code> is now inherited from
the <code>Node</code> interface where it was moved.</p>
</def>
</gitem>
<gitem>
<label>Exception <code>DOMException</code></label>
<def><p>The <code>DOMException</code> has five new
exception codes: <code>INVALID_STATE_ERR</code>,
<code>SYNTAX_ERR</code>, <code>INVALID_MODIFICATION_ERR</code>,
<code>NAMESPACE_ERR</code> and <code>INVALID_ACCESS_ERR</code>.</p>
</def>
</gitem>
</glist>
</div3>
<div3 id="DOMLevel2Addons">
<head>New features</head>
<div4 id='DOMLevel2Addons-types'>
<head>New types</head>
<glist>
<gitem>
<label><code>DOMTimeStamp</code></label>
<def>
<p>
The <code>DOMTimeStamp</code> type was added to the Core
module.
</p>
</def>
</gitem>
</glist>
</div4>
</div3>
</div2>
</div1>
+383
View File
@@ -0,0 +1,383 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--
*************************************************************************
* BEGINNING OF CORE *
*************************************************************************
-->
<div1 id="Core">
<head>Document Object Model Core</head>
<orglist role="editors">
<member>
<name>Arnaud Le Hors</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Gavin Nicol</name>
<affiliation>Inso EPS (for DOM Level 1)</affiliation>
</member>
<member>
<name>Lauren Wood</name>
<affiliation>SoftQuad, Inc. (for DOM Level 1)</affiliation>
</member>
<member>
<name>Mike Champion</name>
<affiliation>ArborText (for DOM Level 1 from November 20,
1997)</affiliation>
</member>
<member>
<name>Steve Byrne</name>
<affiliation>JavaSoft (for DOM Level 1 until November 19,
1997)</affiliation>
</member>
</orglist> <?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="ID-1590626201">
<head>Overview of the DOM Core Interfaces</head>
<p>This section defines a set of objects and interfaces for accessing and
manipulating document objects. The functionality specified in this section (the
<emph>Core</emph> functionality) is sufficient to allow software developers and
web script authors to access and manipulate parsed HTML and XML content inside
conforming products. The DOM Core API also allows creation and population of a <code>Document</code> object using only DOM API calls; loading a <code>Document</code> and saving it persistently is left to the product that implements the
DOM API.</p>
<div3 id="ID-1590626202"><head>The DOM Structure Model</head>
<p>The DOM presents documents as a hierarchy of <code>Node</code> objects that also implement other, more specialized interfaces. Some
types of nodes may have <termref def="dt-child">child</termref> nodes of
various types, and others are leaf nodes that cannot have anything below them
in the document structure. For XML and HTML, the node types, and which node
types they may have as children, are as follows:
<ulist>
<item>
<p><code>Document</code> -- <code>Element</code> (maximum of one), <code>ProcessingInstruction</code>, <code>Comment</code>, <code>DocumentType</code> (maximum of one) </p>
</item>
<item>
<p><code>DocumentFragment</code> -- <code>Element</code>, <code>ProcessingInstruction</code>, <code>Comment</code>, <code>Text</code>, <code>CDATASection</code>, <code>EntityReference</code> </p>
</item>
<item>
<p><code>DocumentType</code> -- no children</p>
</item>
<item>
<p><code>EntityReference</code> -- <code>Element</code>, <code>ProcessingInstruction</code>, <code>Comment</code>, <code>Text</code>, <code>CDATASection</code>, <code>EntityReference</code> </p>
</item>
<item>
<p><code>Element</code> -- <code>Element</code>, <code>Text</code>, <code>Comment</code>, <code>ProcessingInstruction</code>, <code>CDATASection</code>, <code>EntityReference</code></p>
</item>
<item>
<p><code>Attr</code> -- <code>Text</code>, <code>EntityReference</code></p>
</item>
<item>
<p><code>ProcessingInstruction</code> -- no children</p>
</item>
<item>
<p><code>Comment</code> -- no children</p>
</item>
<item>
<p><code>Text</code> -- no children</p>
</item>
<item>
<p><code>CDATASection</code> -- no children</p>
</item>
<item>
<p><code>Entity</code> -- <code>Element</code>, <code>ProcessingInstruction</code>, <code>Comment</code>, <code>Text</code>, <code>CDATASection</code>, <code>EntityReference</code></p>
</item>
<item>
<p><code>Notation</code> -- no children</p>
</item>
</ulist> </p>
<p>The DOM also specifies a <code>NodeList</code> interface to handle ordered lists of <code>Nodes</code>, such as the children of a <code>Node</code>, or the <termref def="dt-element">elements</termref> returned by the <code>getElementsByTagName</code> method of the <code>Element</code> interface, and also a <code>NamedNodeMap</code> interface to handle unordered sets of nodes referenced by their name
attribute, such as the attributes of an <code>Element</code>. <termdef id="td-live" term="live"> <code>NodeList</code> and <code>NamedNodeMap</code> objects in the DOM are <term>live</term>; that is, changes to the
underlying document structure are reflected in all relevant <code>NodeList</code> and <code>NamedNodeMap</code> objects. For example, if a DOM user gets a <code>NodeList</code> object containing the children of an <code>Element</code>, then subsequently adds more children to that <termref
def="dt-element">element</termref> (or removes children, or modifies them),
those changes are automatically reflected in the <code>NodeList</code>, without further action on the user's part. Likewise, changes to a <code>Node</code> in the tree are reflected in all references to that <code>Node</code> in <code>NodeList</code> and <code>NamedNodeMap</code> objects.</termdef></p>
<p>Finally, the interfaces <code>Text</code>, <code>Comment</code>, and <code>CDATASection</code> all inherit from the <code>CharacterData</code> interface.</p>
</div3>
<div3 id="ID-249F15BA"><head>Memory Management</head>
<p>Most of the APIs defined by this specification are
<emph>interfaces</emph> rather than classes. That means that an implementation
need only expose methods with the defined names and specified operation, not
implement classes that correspond directly to the interfaces. This allows the
DOM APIs to be implemented as a thin veneer on top of legacy applications with
their own data structures, or on top of newer applications with different class
hierarchies. This also means that ordinary constructors (in the Java or C++
sense) cannot be used to create DOM objects, since the underlying objects to be
constructed may have little relationship to the DOM interfaces. The
conventional solution to this in object-oriented design is to define
<emph>factory</emph> methods that create instances of objects that implement
the various interfaces. Objects implementing some interface "X" are created by
a "createX()" method on the <code>Document</code> interface; this is because all DOM objects live in the context of a
specific Document.</p>
<p>The DOM Level 2 API does <emph>not</emph> define a standard way to
create <code>DOMImplementation</code> objects; DOM implementations must provide some proprietary way of
bootstrapping these DOM interfaces, and then all other objects can be built
from there.</p>
<p>The Core DOM APIs are designed to be compatible with a wide range of
languages, including both general-user scripting languages and the more
challenging languages used mostly by professional programmers. Thus, the DOM
APIs need to operate across a variety of memory management philosophies, from
language bindings that do not expose memory management to the user at all,
through those (notably Java) that provide explicit constructors but provide an
automatic garbage collection mechanism to automatically reclaim unused memory,
to those (especially C/C++) that generally require the programmer to explicitly
allocate object memory, track where it is used, and explicitly free it for
re-use. To ensure a consistent API across these platforms, the DOM does not
address memory management issues at all, but instead leaves these for the
implementation. Neither of the explicit language bindings defined by the DOM
API (for <termref def="dt-ECMAScript">ECMAScript</termref> and Java)
require any memory management methods, but DOM bindings for other languages
(especially C or C++) may require such support. These extensions will be the
responsibility of those adapting the DOM API to a specific language, not the
DOM Working Group. </p>
</div3>
<div3 id="ID-45A944CB">
<head>Naming Conventions</head>
<p>While it would be nice to have attribute and method names that are
short, informative, internally consistent, and familiar to users of similar
APIs, the names also should not clash with the names in legacy APIs supported
by DOM implementations. Furthermore, both OMG IDL and <code>ECMAScript</code> have significant limitations in their ability to disambiguate names
from different namespaces that make it difficult to avoid naming conflicts with
short, familiar names. So, DOM names tend to be long and descriptive
in order to be unique across all environments. </p>
<p>The Working Group has also attempted to be internally consistent in
its use of various terms, even though these may not be common distinctions in
other APIs. For example, the DOM API uses the method name "remove" when the method
changes the structural model, and the method name "delete" when the method gets
rid of something inside the structure model. The thing that is deleted is not
returned. The thing that is removed may be returned, when it makes sense to
return it. </p>
</div3>
<div3 id="ID-1CED5498">
<head>Inheritance vs. Flattened Views of the API</head>
<p>The DOM Core <termref def="dt-API">APIs</termref> present two somewhat
different sets of interfaces to an XML/HTML document: one presenting an "object
oriented" approach with a hierarchy of <termref
def="dt-inheritance">inheritance</termref>, and a "simplified" view that allows
all manipulation to be done via the <code>Node</code> interface without requiring casts (in Java and other C-like languages)
or query interface calls in <termref def="dt-COM">COM</termref> environments.
These operations are fairly expensive in Java and COM, and the DOM may be used
in performance-critical environments, so we allow significant functionality
using just the <code>Node</code> interface. Because many other users will find the
<termref def="dt-inheritance">inheritance</termref> hierarchy easier to
understand than the "everything is a <code>Node</code>" approach to the DOM, we also support the full higher-level interfaces
for those who prefer a more object-oriented <termref
def="dt-API">API</termref>. </p>
<p>In practice, this means that there is a certain amount of redundancy
in the <termref def="dt-API">API</termref>. The Working Group considers the
"<termref def="dt-inheritance">inheritance</termref>" approach the primary view
of the API, and the full set of functionality on <code>Node</code> to be "extra" functionality that users may employ, but that does not
eliminate the need for methods on other interfaces that an object-oriented
analysis would dictate. (Of course, when the O-O analysis yields an attribute
or method that is identical to one on the <code>Node</code> interface, we don't specify a completely redundant one.) Thus, even
though there is a generic <code>nodeName</code> attribute on the <code>Node</code> interface, there is still a <code>tagName</code> attribute on the <code>Element</code> interface; these two attributes must contain the same value, but the
it is worthwhile to support both, given the different
constituencies the DOM <termref def="dt-API">API</termref> must satisfy. </p>
</div3>
<div3 id="ID-C74D1578">
<head>The <code>DOMString</code> type</head>
<p>To ensure interoperability, the DOM specifies the following:</p>
<ulist>
<item>
<definitions>
<typedef name="DOMString" id="DOMString">
<descr>
<p>A <code>DOMString</code> is a sequence of <termref def="dt-16-bit-unit">16-bit
units</termref>.</p>
</descr>
<sequence type="unsigned short"/>
</typedef>
</definitions>
</item>
<item>
<p>Applications must encode <code>DOMString</code> using UTF-16 (defined in <bibref ref="Unicode"/> and Amendment 1 of
<bibref ref="ISO10646"/>).</p>
<p>The UTF-16 encoding was chosen because of its widespread industry
practice. 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 <code>DOMString</code> (a high surrogate and a low surrogate).</p>
<note>
<p>Even though the DOM defines the name of the string type to be <code>DOMString</code>, bindings may use different names. For example for Java, <code>DOMString</code> is bound to the <code>String</code> type because it also uses UTF-16 as its encoding.</p>
</note>
</item>
</ulist>
<note>
<p>As of August 2000, the OMG IDL specification (<bibref
ref="OMGIDL"/>) included a <code>wstring</code> type. However, that definition did not meet the interoperability
criteria of the DOM <termref def="dt-API">API</termref> since it relied on
negotiation to decide the width and encoding of a character.</p>
</note>
</div3>
<div3 id="Core-DOMTimeStamp">
<head>The <code>DOMTimeStamp</code> type</head>
<p>To ensure interoperability, the DOM specifies the following:</p>
<ulist>
<item>
<definitions>
<typedef name="DOMTimeStamp" id="DOMTimeStamp">
<descr>
<p> A <code>DOMTimeStamp</code> represents a number of milliseconds. </p>
</descr>
<typename>unsigned long long</typename>
</typedef>
</definitions>
</item>
<item>
<note>
<p> Even though the DOM uses the type <code>DOMTimeStamp</code>, bindings may use different types. For example for Java, <code>DOMTimeStamp</code> is bound to the <code>long</code> type. In ECMAScript, <code>TimeStamp</code> is bound to the <code>Date</code> type because the range of the <code>integer</code> type is too small. </p>
</note>
</item>
</ulist>
</div3>
<div3 id="ID-5DFED1F0">
<head>String comparisons in the DOM</head>
<p>The DOM has many interfaces that imply string matching. HTML
processors generally assume an uppercase (less often, lowercase) normalization
of names for such things as <termref def="dt-element">elements</termref>, while
XML is explicitly case sensitive. For the purposes of the DOM, string matching
is performed purely by binary <termref
def="dt-string-compare">comparison</termref> of the
<termref def="dt-16-bit-unit">16-bit units</termref> of the <code>DOMString</code>. In addition, the DOM assumes that any case normalizations take place
in the processor, <emph>before</emph> the DOM structures are built.</p>
<note>
<p>Besides case folding, there are additional normalizations that can
be applied to text. The W3C I18N Working Group is in the process of defining
exactly which normalizations are necessary, and where they should be applied.
The W3C I18N Working Group expects to require early normalization, which means
that data read into the DOM is assumed to already be normalized. The DOM and
applications built on top of it in this case only have to assure that text
remains normalized when being changed. For further details, please see
<bibref ref="Charmod"/>.</p>
</note>
</div3>
<div3 id="Namespaces-Considerations">
<head>XML Namespaces</head>
<p>The DOM Level 2 supports XML namespaces <bibref ref="Namespaces"/> by
augmenting several interfaces of the DOM Level 1 Core to allow creating and
manipulating <termref def="dt-element">elements</termref> and attributes
associated to a namespace.</p>
<p>As far as the DOM is concerned, special attributes used for declaring
<termref def="dt-XML-namespace">XML namespaces</termref> are still exposed and
can be manipulated just like any other attribute. However, nodes are
permanently bound to <termref def="dt-namespaceURI">namespace URIs</termref> as
they get created. Consequently, moving a node within a document, using the DOM,
in no case results in a change of its <termref
def="dt-namespaceprefix">namespace prefix</termref> or namespace URI.
Similarly, creating a node with a namespace prefix and namespace URI, or
changing the namespace prefix of a node, does not result in any addition,
removal, or modification of any special attributes for declaring the
appropriate XML namespaces. Namespace validation is not enforced; the DOM
application is responsible. In particular, since the mapping between prefixes
and namespace URIs is not enforced, in general, the resulting document cannot
be serialized naively. For example, applications may have to declare every
namespace in use when serializing a document.</p>
<p>DOM Level 2 doesn't perform any URI normalization or canonicalization.
The URIs given to the DOM are assumed to be valid (e.g., characters such as
whitespaces are properly escaped), and no lexical checking is performed.
Absolute URI references are treated as strings and
<termref def="dt-string-compare">compared literally</termref>. How relative
namespace URI references are treated is undefined. To ensure interoperability
only absolute namespace URI references (i.e., URI references beginning with a
scheme name and a colon) should be used. Note that because the DOM does no
lexical checking, the empty string will be treated as a real namespace URI
in DOM Level 2 methods. Applications must use the value <code>null</code>
as the namespaceURI parameter for methods if they wish to have no
namespace.</p>
<note>
<p>In the DOM, all namespace declaration attributes are <emph>by
definition</emph> bound to the namespace URI: "<loc
href="&xmlns-ns;">&xmlns-ns;</loc>". These are the attributes whose
<termref def="dt-namespaceprefix">namespace prefix</termref> or
<termref def="dt-qualifiedname">qualified name</termref> is "xmlns". Although,
at the time of writing, this is not part of the XML Namespaces specification
<bibref ref="Namespaces"/>, it is planned to be incorporated in a future
revision.</p>
</note>
<p>In a document with no namespaces, the <termref
def="dt-child">child</termref> list of an <code>EntityReference</code> node is always the same as that of the corresponding <code>Entity</code>. This is not true in a document where an entity contains unbound
<termref def="dt-namespaceprefix">namespace prefixes</termref>. In such a case,
the <termref def="dt-descendant">descendants</termref> of the corresponding <code>EntityReference</code> nodes may be bound to different <termref
def="dt-namespaceURI">namespace URIs</termref>, depending on where the entity
references are. Also, because, in the DOM, nodes always remain bound to the
same namespace URI, moving such <code>EntityReference</code> nodes can lead to documents that cannot be serialized. This is also
true when the DOM Level 1 method <code>createEntityReference</code> of the <code>Document</code> interface is used to create entity references that correspond to such
entities, since the <termref def="dt-descendant">descendants</termref> of the
returned <code>EntityReference</code> are unbound. The DOM Level 2 does not support any mechanism to resolve
namespace prefixes. For all of these reasons, use of such entities and entity
references should be avoided or used with extreme care. A future Level of the
DOM may include some additional support for handling these.</p>
<p>The new methods, such as <code>createElementNS</code> and <code>createAttributeNS</code> of the <code>Document</code> interface, are meant to be used by namespace aware applications. Simple
applications that do not use namespaces can use the DOM Level 1 methods, such
as <code>createElement</code> and <code>createAttribute</code>. Elements and attributes created in this way do not have any namespace
prefix, namespace URI, or local name.</p>
<note>
<p>DOM Level 1 methods are namespace ignorant. Therefore, while it is
safe to use these methods when not dealing with namespaces, using them and the
new ones at the same time should be avoided. DOM Level 1 methods solely
identify attribute nodes by their <code>nodeName</code>. On the contrary, the DOM Level 2 methods related to namespaces,
identify attribute nodes by their <code>namespaceURI</code> and <code>localName</code>. Because of this fundamental difference, mixing both sets of methods
can lead to unpredictable results. In particular, using <code>setAttributeNS</code>, an <termref def="dt-element">element</termref> may have two attributes
(or more) that have the same <code>nodeName</code>, but different <code>namespaceURI</code>s. Calling <code>getAttribute</code> with that <code>nodeName</code> could then return any of those attributes. The result depends on the
implementation. Similarly, using <code>setAttributeNode</code>, one can set two attributes (or more) that have different <code>nodeNames</code> but the same <code>prefix</code> and <code>namespaceURI</code>. In this case <code>getAttributeNodeNS</code> will return either attribute, in an implementation dependent manner.
The only guarantee in such cases is that all methods that access a named item
by its <code>nodeName</code> will access the same item, and all methods which access a node by its
URI and local name will access the same node. For instance, <code>setAttribute</code> and <code>setAttributeNS</code> affect the node that <code>getAttribute</code> and <code>getAttributeNS</code>, respectively, return.</p>
</note>
</div3>
</div2> <!--
******************************************************
| DOCUMENT OBJECT MODEL APIs |
******************************************************
-->
<div2 id="ID-BBACDC08">
<head>Fundamental Interfaces</head>
<p>The interfaces within this section are considered
<emph>fundamental</emph>, and must be fully implemented by all conforming
implementations of the DOM, including all HTML DOM implementations
<bibref ref="DOMHTML-inf"/>, unless otherwise specified.
</p>
<p>
A DOM application may use the <code>hasFeature(feature,
version)</code> method of the <code>DOMImplementation</code>
interface with parameter values "Core" and "2.0" (respectively) to
determine whether or not this module is supported by the
implementation. Any implementation that conforms to DOM Level 2 or a
DOM Level 2 module must conform to the Core module. Please refer to
additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in this specification.
</p>
<definitions> &exceptions; &core-dom; &core-document; &core-node;
&core-node-list; &core-named-node-map; &core-data; &core-attribute;
&core-element; &core-text; &core-comment;
</definitions>
</div2>
<div2 id="ID-E067D597">
<head>Extended Interfaces</head>
<p>The interfaces defined here form part of the DOM Core specification, but
objects that expose these interfaces will never be encountered in a DOM
implementation that deals only with HTML. As such, HTML-only DOM
implementations <bibref ref="DOMHTML-inf"/> do not need to have objects that
implement these interfaces.</p>
<p>
The interfaces found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"XML" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined in
<specref ref="ID-BBACDC08"/>. Please refer to additional information about
<specref ref='ID-Conformance'/> in this specification.
</p>
<definitions> &core-cdata-section; &core-doctype; &core-notation;
&core-entity; &core-entity-reference; &core-pi;
</definitions>
</div2></div1><!--
*************************************************************************
* END OF CORE *
*************************************************************************
-->
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ Attr object description ]-->
<interface name="Attr" inherits="Node" id="ID-637646024">
<descr><p>
The <code>Attr</code> interface represents an attribute in an <code>Element</code> object.
Typically the allowable values for the attribute are defined in a document
type definition.</p>
<p><code>Attr</code> objects inherit the <code>Node</code>
interface, but since they are not actually child nodes of the element
they describe, the DOM does not consider them part of the document
tree. Thus, the <code>Node</code> attributes <code>parentNode</code>,
<code>previousSibling</code>, and <code>nextSibling</code> have a
<code>null</code> value for <code>Attr</code> objects. The DOM takes the
view that attributes are properties of elements rather than having a
separate identity from the elements they are associated with;
this should make it more efficient to implement
such features as default attributes associated with all elements of a
given type. Furthermore, <code>Attr</code>
nodes may not be immediate children of a <code>DocumentFragment</code>.
However, they can be associated with <code>Element</code> nodes contained within
a <code>DocumentFragment</code>.
In short, users and implementors of the DOM need to be aware that
<code>Attr</code> nodes have some things in
common with other objects inheriting the <code>Node</code> interface,
but they also are quite distinct.</p>
<p> The attribute's effective value is determined as follows: if this
attribute has been explicitly assigned any value, that value is the
attribute's effective value; otherwise, if there is a declaration for
this attribute, and that declaration includes a default value, then
that default value is the attribute's effective value; otherwise, the
attribute does not exist on this element in the structure model until
it has been explicitly added. Note that the <code>nodeValue</code>
attribute on the <code>Attr</code> instance can also be used to
retrieve the string version of the attribute's value(s). </p>
<p>In XML, where the value of an attribute can contain entity references,
the child nodes of the <code>Attr</code> node may be either
<code>Text</code> or <code>EntityReference</code> nodes (when these are in
use; see the description of <code>EntityReference</code> for
discussion). Because the DOM Core is not aware of attribute types, it
treats all attribute values as simple strings, even if the DTD or schema
declares them as having <termref def="dt-tokenized">tokenized</termref>
types.
</p>
</descr>
<attribute type="DOMString" readonly="yes" name="name" id="ID-1112119403">
<descr><p>Returns the name of this attribute. </p></descr>
</attribute>
<attribute type="boolean" readonly="yes" name="specified" id="ID-862529273">
<descr><p>If this attribute was explicitly given a value in the original
document, this is <code>true</code>; otherwise, it is <code>false</code>.
Note that the implementation is in charge of this attribute, not the
user. If the user changes the value of the attribute (even if it ends up
having the same value as the default value) then the <code>specified</code>
flag is automatically flipped to <code>true</code>. To re-specify the
attribute as the default value from the DTD, the user must delete the
attribute. The implementation will then make a new attribute available
with <code>specified</code> set to <code>false</code> and the default value
(if one exists).</p>
<p>In summary:
<ulist>
<item><p> If the attribute has an assigned value in the document then
<code>specified</code> is <code>true</code>, and the value is the
assigned value.
</p></item>
<item><p> If the attribute has no assigned value in the document and has
a default value in the DTD, then <code>specified</code> is <code>false</code>,
and the value is the default value in the DTD.</p></item>
<item><p> If the attribute has no assigned value in the document and has
a value of #IMPLIED in the DTD, then the attribute does not appear
in the structure model of the document.
</p></item>
<item><p>If the <code>ownerElement</code> attribute is
<code>null</code> (i.e. because it was just created or was set to
<code>null</code> by the various removal and cloning operations)
<code>specified</code> is <code>true</code>.</p>
</item>
</ulist>
</p>
</descr>
</attribute>
<attribute type="DOMString" name="value" id="ID-221662474">
<descr><p>On retrieval, the value of the attribute is returned as a
string. Character and general entity references are replaced with their
values. See also the method <code>getAttribute</code> on the
<code>Element</code> interface.</p>
<p>On setting, this creates a <code>Text</code> node with the unparsed
contents of the string. I.e. any characters that an XML processor would
recognize as markup are instead treated as literal text.
See also the method <code>setAttribute</code> on the
<code>Element</code> interface.</p></descr>
<setraises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.</p></descr>
</exception>
</setraises>
</attribute>
<!-- ****** DOM Level 2 additions ****** -->
<attribute name="ownerElement" type="Element" readonly="yes"
id="Attr-ownerElement" since="DOM Level 2">
<descr><p>The <code>Element</code> node this attribute is attached to or
<code>null</code> if this attribute is not in use.</p></descr>
</attribute>
</interface>
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ CDATA Section ]-->
<!-- $Date$ $Revision$ -->
<interface name="CDATASection" inherits="Text" id="ID-667469212">
<descr><p>CDATA sections are used to escape blocks of text containing
characters that would otherwise be regarded as markup. The only
delimiter that is recognized in a CDATA section is the "]]&gt;" string
that ends the CDATA section. CDATA sections cannot be
nested. Their primary purpose is for including
material such as XML fragments, without needing to escape all
the delimiters.</p><p>The <code>DOMString</code> attribute of the
<code>Text</code> node holds the text that is contained by the CDATA
section. Note that this <emph>may</emph> contain characters
that need to be escaped outside of CDATA sections and that, depending on
the character encoding ("charset") chosen for serialization, it may be
impossible to write out some characters as part of a CDATA section. </p>
<p> The <code>CDATASection</code> interface inherits from the
<code>CharacterData</code> interface through the <code>Text</code>
interface. Adjacent <code>CDATASection</code> nodes are not merged by
use of the <code>normalize</code> method of the <code>Node</code>
interface.</p>
<note>
<p>Because no markup is recognized within a <code>CDATASection</code>,
character numeric references cannot be used as an escape mechanism
when serializing. Therefore, action needs to be taken when serializing
a <code>CDATASection</code> with a character encoding where some of
the contained characters cannot be represented. Failure to do so would
not produce well-formed XML.</p>
<p>One potential solution in the serialization process is to end the
CDATA section before the character, output the character using a
character reference or entity reference, and open a new CDATA section
for any further characters in the text node. Note, however, that some
code conversion libraries at the time of writing do not return an
error or exception when a character is missing from the encoding,
making the task of ensuring that data is not corrupted on serialization
more difficult.</p>
</note>
</descr>
</interface>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ Comment object description ]-->
<!-- $Date$ $Revision$ -->
<interface name="Comment" inherits="CharacterData" id="ID-1728279322">
<descr><p>This interface inherits from <code>CharacterData</code> and
represents the content of a comment, i.e., all the
characters between the starting '<code>&lt;!--</code>' and
ending '<code>--&gt;</code>'. Note that this is the definition
of a comment in XML, and, in practice, HTML, although some HTML
tools may implement the full SGML comment structure.</p></descr>
</interface>
+195
View File
@@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ Data interface description ]-->
<!-- $Date$ $Revision$ -->
<interface name="CharacterData" inherits="Node" id="ID-FF21A306">
<descr><p>The <code>CharacterData</code> interface extends Node with a set of
attributes and methods for accessing character data in the DOM. For
clarity this set is defined here rather than on each object that uses
these attributes and methods. No DOM objects correspond directly to
<code>CharacterData</code>, though <code>Text</code> and others do
inherit the interface from it. All <code>offsets</code> in this
interface start from <code>0</code>.</p>
<p>As explained in the <code>DOMString</code> interface, text strings
in the DOM are represented in UTF-16, i.e. as a sequence of 16-bit
units. In the following, the term <termref
def='dt-16-bit-unit'>16-bit units</termref> is used whenever
necessary to indicate that indexing on CharacterData is done in
16-bit units.</p>
</descr>
<attribute type="DOMString" name="data" id="ID-72AB8359">
<descr><p>The character data of the node
that implements this interface. The DOM implementation may not
put arbitrary limits on the amount of data that may be stored in a
<code>CharacterData</code> node. However, implementation limits may
mean that the entirety of a node's data may not fit into a single
<code>DOMString</code>. In such cases, the user may call
<code>substringData</code> to retrieve the data in appropriately sized
pieces.</p>
</descr>
<setraises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.</p></descr>
</exception>
</setraises>
<getraises>
<exception name="DOMException">
<descr><p>DOMSTRING_SIZE_ERR: Raised when it would return more
characters than fit in a <code>DOMString</code> variable on the
implementation platform.</p></descr>
</exception>
</getraises>
</attribute>
<attribute type="unsigned long" name="length" readonly="yes" id="ID-7D61178C">
<descr><p>The number of <termref def='dt-16-bit-unit'>16-bit
units</termref> that are available through <code>data</code> and the
<code>substringData</code> method below. This may have the value zero,
i.e., <code>CharacterData</code> nodes may be empty.</p>
</descr>
</attribute>
<method name="substringData" id="ID-6531BCCF">
<descr><p>Extracts a range of data from the node.</p></descr>
<parameters>
<param name="offset" type="unsigned long" attr="in">
<descr><p>Start offset of substring to extract.</p></descr>
</param>
<param name="count" type="unsigned long" attr="in">
<descr><p>The number of 16-bit units to extract.</p></descr>
</param>
</parameters>
<returns type="DOMString">
<descr><p>The specified substring. If the sum of <code>offset</code> and
<code>count</code> exceeds the <code>length</code>, then all 16-bit
units to the end of the data are returned.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INDEX_SIZE_ERR: Raised if the specified <code>offset</code>
is negative or greater than the number of 16-bit units in
<code>data</code>, or if the specified <code>count</code> is
negative.</p>
<p>DOMSTRING_SIZE_ERR: Raised if the specified range of text does
not fit into a <code>DOMString</code>.</p>
</descr>
</exception>
</raises>
</method>
<method name="appendData" id="ID-32791A2F">
<descr>
<p>Append the string to the end of the character data of the node.
Upon success, <code>data</code> provides access to the concatenation of
<code>data</code> and the <code>DOMString</code> specified.</p>
</descr>
<parameters>
<param name="arg" type="DOMString" attr="in">
<descr><p>The <code>DOMString</code> to append.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.</p></descr>
</exception>
</raises>
</method>
<!-- NOTE -->
<method name="insertData" id="ID-3EDB695F">
<descr>
<p>Insert a string at the specified <termref def='dt-16-bit-unit'>16-bit
unit</termref> offset.</p>
</descr>
<parameters>
<param name="offset" type="unsigned long" attr="in">
<descr><p>The character offset at which to insert.</p></descr>
</param>
<param name="arg" type="DOMString" attr="in">
<descr><p>The <code>DOMString</code> to insert.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INDEX_SIZE_ERR: Raised if the specified <code>offset</code>
is negative or greater than the number of 16-bit units in
<code>data</code>.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="deleteData" id="ID-7C603781">
<descr>
<p>Remove a range of <termref def='dt-16-bit-unit'>16-bit units</termref>
from the node. Upon success, <code>data</code> and <code>length</code>
reflect the change.</p>
</descr>
<parameters>
<param name="offset" type="unsigned long" attr="in">
<descr><p>The offset from which to start removing.</p>
</descr>
</param>
<param name="count" type="unsigned long" attr="in">
<descr><p>The number of 16-bit units to delete. If the sum of
<code>offset</code> and <code>count</code> exceeds
<code>length</code> then all 16-bit units from <code>offset</code>
to the end of the data are deleted.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INDEX_SIZE_ERR: Raised if the specified <code>offset</code>
is negative or greater than the number of 16-bit units in
<code>data</code>, or if the specified <code>count</code> is
negative.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="replaceData" id="ID-E5CBA7FB">
<descr>
<p>Replace the characters starting at the specified <termref
def='dt-16-bit-unit'>16-bit unit</termref> offset with the specified
string.</p>
</descr>
<parameters>
<param name="offset" type="unsigned long" attr="in">
<descr><p>The offset from which to start replacing.</p></descr>
</param>
<param name="count" type="unsigned long" attr="in">
<descr><p>The number of 16-bit units to replace. If the sum of
<code>offset</code> and <code>count</code> exceeds
<code>length</code>, then all 16-bit units to the end of the data
are replaced; (i.e., the effect is the same as a
<code>remove</code> method call with the same range, followed
by an <code>append</code> method invocation).</p></descr>
</param>
<param name="arg" type="DOMString" attr="in">
<descr><p>The <code>DOMString</code> with which the range must
be replaced.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INDEX_SIZE_ERR: Raised if the specified <code>offset</code>
is negative or greater than the number of 16-bit units in
<code>data</code>, or if the specified <code>count</code> is
negative.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ DocumentType object description ]-->
<interface name="DocumentType" inherits="Node" id="ID-412266927">
<descr><p>Each <code>Document</code> has a <code>doctype</code> attribute
whose value is either <code>null</code> or a <code>DocumentType</code>
object. The <code>DocumentType</code> interface in the DOM Core
provides an interface to the list of entities that are defined
for the document, and little else because the effect of
namespaces and the various XML schema efforts on DTD
representation are not clearly understood as of this writing.</p>
<p>The DOM Level 2 doesn't support editing <code>DocumentType</code>
nodes.</p></descr>
<attribute readonly="yes" name="name" type="DOMString" id="ID-1844763134">
<descr><p>The name of DTD; i.e., the name immediately
following the <code>DOCTYPE</code> keyword.</p></descr>
</attribute>
<attribute readonly="yes" name="entities" type="NamedNodeMap" id="ID-1788794630">
<descr><p>A <code>NamedNodeMap</code> containing the general entities, both
external and internal, declared in the DTD. Parameter entities are not
contained. Duplicates are discarded.
For example in:
<eg role="code">&lt;!DOCTYPE ex SYSTEM "ex.dtd" [
&lt;!ENTITY foo "foo">
&lt;!ENTITY bar "bar">
&lt;!ENTITY bar "bar2">
&lt;!ENTITY % baz "baz">
]>
&lt;ex/></eg>
the interface provides access to <code>foo</code> and
the first declaration of <code>bar</code> but not the second declaration of
<code>bar</code> or <code>baz</code>. Every node in this map
also implements the <code>Entity</code> interface.</p>
<p>The DOM Level 2 does not support editing entities, therefore
<code>entities</code> cannot be altered in any way.</p>
</descr>
</attribute>
<attribute readonly="yes" name="notations" type="NamedNodeMap" id="ID-D46829EF">
<descr><p>A <code>NamedNodeMap</code> containing the
notations declared in the DTD. Duplicates are discarded. Every node in
this map also implements the <code>Notation</code> interface.</p>
<p>The DOM Level 2 does not support editing notations, therefore
<code>notations</code> cannot be altered in any way.</p></descr>
</attribute>
<!-- ****** DOM Level 2 additions ****** -->
<attribute readonly="yes" name="publicId" type="DOMString"
id="ID-Core-DocType-publicId" since="DOM Level 2">
<descr><p>The public identifier of the external subset.</p></descr>
</attribute>
<attribute readonly="yes" name="systemId" type="DOMString"
id="ID-Core-DocType-systemId" since="DOM Level 2">
<descr><p>The system identifier of the external subset.</p></descr>
</attribute>
<attribute readonly="yes" name="internalSubset" type="DOMString"
id="ID-Core-DocType-internalSubset" since="DOM Level 2">
<descr><p>The internal subset as a string.</p>
<note><p>The actual content returned depends on how much information is
available to the implementation. This may vary depending on various
parameters, including the XML processor used to build the
document.</p>
</note>
</descr>
</attribute>
</interface>
@@ -0,0 +1,607 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ DocumentFragment object description ]-->
<!-- $Date$ $Revision$ -->
<interface name="DocumentFragment" inherits="Node" id="ID-B63ED1A3">
<descr><p><code>DocumentFragment</code> is a "lightweight" or "minimal"
<code>Document</code> object. It is very common to want to be able to
extract a portion of a document's tree or to create a new fragment of a
document. Imagine implementing a user command like cut or rearranging a
document by moving fragments around. It is desirable to have an object
which can hold such fragments and it is quite natural to use a Node for
this purpose. While it is true that a <code>Document</code> object could
fulfill this role, a <code>Document</code> object can potentially be a
heavyweight object, depending on the underlying implementation. What is
really needed for this is a very lightweight object.
<code>DocumentFragment</code> is such an object.</p>
<p>Furthermore, various operations -- such as inserting nodes as children
of another <code>Node</code> -- may take <code>DocumentFragment</code>
objects as arguments; this results in all the child nodes of the
<code>DocumentFragment</code> being moved to the child list of this
node.</p>
<p>The children of a <code>DocumentFragment</code> node are zero or more
nodes representing the tops of any sub-trees defining the structure of
the document. <code>DocumentFragment</code> nodes do not need to be
<termref def="dt-well-formed">well-formed XML documents</termref> (although they do need to follow the rules
imposed upon well-formed XML parsed entities, which can have multiple top
nodes). For example, a <code>DocumentFragment</code> might have only one
child and that child node could be a <code>Text</code> node. Such a
structure model represents neither an HTML document nor a well-formed XML
document.</p>
<p>When a <code>DocumentFragment</code> is inserted into a
<code>Document</code> (or indeed any other <code>Node</code> that may
take children) the children of the <code>DocumentFragment</code> and not
the <code>DocumentFragment</code> itself are inserted into the
<code>Node</code>. This makes the <code>DocumentFragment</code> very
useful when the user wishes to create nodes that are <termref def="dt-sibling">siblings</termref>; the
<code>DocumentFragment</code> acts as the parent of these nodes so that
the user can use the standard methods from the <code>Node</code>
interface, such as <code>insertBefore</code> and
<code>appendChild</code>.</p>
</descr>
</interface>
<!--[ Document object description ]-->
<interface name="Document" inherits="Node" id="i-Document">
<descr><p>The <code>Document</code> interface represents the entire
HTML or XML document. Conceptually, it is the <termref def="dt-root-node">root</termref> of the
document tree, and provides the primary access to the
document's data.</p>
<p>Since elements, text nodes, comments, processing instructions,
etc. cannot exist outside the context of a <code>Document</code>, the
<code>Document</code> interface also contains the factory methods needed
to create these objects. The <code>Node</code> objects created have a
<code>ownerDocument</code> attribute which associates them with the
<code>Document</code> within whose context they were created.</p>
</descr>
<attribute readonly="yes" name="doctype" type="DocumentType"
id="ID-B63ED1A31">
<descr><p>The Document Type Declaration (see <code>DocumentType</code>)
associated with this document. For HTML documents as well as XML
documents without a document type declaration this returns
<code>null</code>. The DOM Level 2 does not support editing the
Document Type Declaration. <code>docType</code> cannot be
altered in any way, including through the use of methods inherited from
the <code>Node</code> interface, such as <code>insertNode</code> or
<code>removeNode</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" name="implementation" type="DOMImplementation"
id="ID-1B793EBA">
<descr><p>The <code>DOMImplementation</code> object that handles this
document. A DOM application may use objects from multiple
implementations.</p>
</descr>
</attribute>
<attribute readonly="yes" name="documentElement" type="Element"
id="ID-87CD092">
<descr><p>This is a <termref def="dt-convenience">convenience</termref> attribute that allows direct
access to the child node that is the root element of the
document. For HTML documents, this is the element with
the tagName "HTML".</p></descr>
</attribute>
<!-- ********** -->
<method name="createElement" id="ID-2141741547">
<descr><p>Creates an element of the type specified. Note that the instance
returned implements the <code>Element</code> interface, so attributes
can be specified directly on the returned object.</p>
<p>In addition, if there are known attributes with default values,
<code>Attr</code> nodes representing them are automatically created and
attached to the element.</p>
<p>To create an element with a qualified name and namespace URI, use the
<code>createElementNS</code> method.</p>
</descr>
<parameters>
<param name="tagName" type="DOMString" attr="in">
<descr><p>The name of the element type to
instantiate. For XML, this is case-sensitive. For HTML, the
<code>tagName</code> parameter may be provided in any case,
but it must be mapped to the canonical uppercase form by
the DOM implementation.
</p></descr>
</param>
</parameters>
<returns type="Element">
<descr><p>A new <code>Element</code> object with the
<code>nodeName</code> attribute set to <code>tagName</code>, and
<code>localName</code>, <code>prefix</code>, and
<code>namespaceURI</code> set to <code>null</code>.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.</p></descr>
</exception>
</raises>
</method>
<!-- ********** -->
<method name="createDocumentFragment" id="ID-35CB04B5">
<descr><p>Creates an empty <code>DocumentFragment</code> object.
</p></descr>
<parameters>
<!-- No parameters -->
</parameters>
<returns type="DocumentFragment">
<descr><p>A new <code>DocumentFragment</code>.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<!-- ********** -->
<method name="createTextNode" id="ID-1975348127">
<descr><p>Creates a <code>Text</code> node given the specified
string.</p></descr>
<parameters>
<param name="data" type="DOMString" attr="in">
<descr><p>The data for the node.</p></descr>
</param>
</parameters>
<returns type="Text">
<descr><p>The new <code>Text</code> object.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<!-- ********** -->
<method name="createComment" id="ID-1334481328">
<descr><p>Creates a <code>Comment</code> node given the specified
string.</p></descr>
<parameters>
<param name="data" type="DOMString" attr="in">
<descr><p>The data for the node.</p></descr>
</param>
</parameters>
<returns type="Comment">
<descr><p>The new <code>Comment</code> object.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<!-- ********** -->
<method name="createCDATASection" id="ID-D26C0AF8">
<descr><p>Creates a <code>CDATASection</code> node whose value is
the specified string.</p></descr>
<parameters>
<param name="data" type="DOMString" attr="in">
<descr><p>The data for the <code>CDATASection</code> contents.</p>
</descr>
</param>
</parameters>
<returns type="CDATASection">
<descr><p>The new <code>CDATASection</code> object.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NOT_SUPPORTED_ERR: Raised if this document is an HTML
document.</p></descr>
</exception>
</raises>
</method>
<!-- ********** -->
<method name="createProcessingInstruction" id="ID-135944439">
<descr><p>Creates a <code>ProcessingInstruction</code> node given
the specified name and data strings.</p></descr>
<parameters>
<param name="target" type="DOMString" attr="in">
<descr><p>The target part of the processing instruction.</p></descr>
</param>
<param name="data" type="DOMString" attr="in">
<descr><p>The data for the node.</p></descr>
</param>
</parameters>
<returns type="ProcessingInstruction">
<descr><p>The new <code>ProcessingInstruction</code> object.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified target
contains an illegal character.</p>
<p>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.</p>
</descr>
</exception>
</raises>
</method>
<!-- ********** -->
<method name="createAttribute" id="ID-1084891198">
<descr><p>Creates an <code>Attr</code> of the given name.
Note that the <code>Attr</code> instance
can then be set on an <code>Element</code> using the
<code>setAttributeNode</code> method. </p>
<p>To create an attribute with a qualified name and namespace URI, use
the <code>createAttributeNS</code> method.</p>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the attribute.</p></descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>A new <code>Attr</code> object with the <code>nodeName</code>
attribute set to <code>name</code>, and <code>localName</code>,
<code>prefix</code>, and <code>namespaceURI</code> set to
<code>null</code>. The value of the attribute is the empty
string.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.</p></descr>
</exception>
</raises>
</method>
<method name="createEntityReference" id="ID-392B75AE">
<descr><p>Creates an <code>EntityReference</code> object. In addition, if
the referenced entity is known, the child list of the
<code>EntityReference</code> node is made the same as that of the
corresponding <code>Entity</code> node.</p>
<note><p>If any descendant of the <code>Entity</code> node has an
unbound <termref def='dt-namespaceprefix'>namespace prefix</termref>,
the corresponding descendant of the created
<code>EntityReference</code> node is also unbound; (its
<code>namespaceURI</code> is <code>null</code>). The DOM Level 2 does
not support any mechanism to resolve namespace prefixes.</p></note>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the entity to reference. </p>
</descr>
</param>
</parameters>
<returns type="EntityReference">
<descr><p>The new <code>EntityReference</code> object.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.</p>
<p>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.</p>
</descr>
</exception>
</raises>
</method>
<!-- ********** -->
<method name="getElementsByTagName" id="ID-A6C9094">
<descr><p>Returns a <code>NodeList</code> of all the <code>Elements</code>
with a given tag name in the order in which they are encountered
in a preorder traversal of the <code>Document</code> tree.
</p></descr>
<parameters>
<param name="tagname" type="DOMString" attr="in">
<descr><p>The name of the tag to match on. The special value "*"
matches all tags.</p></descr>
</param>
</parameters>
<returns type="NodeList">
<descr><p>A new <code>NodeList</code> object containing
all the matched <code>Elements</code>.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<!-- ****** DOM Level 2 additions ****** -->
<method name="importNode" id="Core-Document-importNode" since="DOM Level 2">
<descr>
<p>Imports a node from another document to this document. The returned
node has no parent; (<code>parentNode</code> is <code>null</code>). The
source node is not altered or removed from the original document; this
method creates a new copy of the source node.</p>
<p>For all nodes, importing a node creates a node object owned by the
importing document, with attribute values identical to the source
node's <code>nodeName</code> and <code>nodeType</code>, plus the
attributes related to namespaces (<code>prefix</code>,
<code>localName</code>, and <code>namespaceURI</code>). As in the
<code>cloneNode</code> operation on a <code>Node</code>, the source
node is not altered.</p>
<p>Additional information is copied as appropriate to the
<code>nodeType</code>, attempting to mirror the behavior expected if a
fragment of XML or HTML source was copied from one document to another,
recognizing that the two documents may have different DTDs in the XML
case. The following list describes the specifics for each type of
node.
<glist>
<gitem>
<label>ATTRIBUTE_NODE</label>
<def><p>The <code>ownerElement</code> attribute is set to
<code>null</code> and the <code>specified</code> flag is set to
<code>true</code> on the generated <code>Attr</code>. The
<termref def="dt-descendant">descendants</termref> of the source <code>Attr</code> are recursively
imported and the resulting nodes reassembled to form the
corresponding subtree.</p>
<p>Note that the <code>deep</code> parameter has no effect on
<code>Attr</code> nodes; they always carry their children with
them when imported.</p>
</def>
</gitem>
<gitem>
<label>DOCUMENT_FRAGMENT_NODE</label>
<def><p>If the <code>deep</code> option was set to
<code>true</code>, the <termref def="dt-descendant">descendants</termref> of the source element are
recursively imported and the resulting nodes reassembled to
form the corresponding subtree. Otherwise, this simply
generates an empty <code>DocumentFragment</code>.</p>
</def>
</gitem>
<gitem>
<label>DOCUMENT_NODE</label>
<def><p><code>Document</code> nodes cannot be imported.</p>
</def>
</gitem>
<gitem>
<label>DOCUMENT_TYPE_NODE</label>
<def><p><code>DocumentType</code> nodes cannot be imported.</p>
</def>
</gitem>
<gitem>
<label>ELEMENT_NODE</label>
<def><p><emph>Specified</emph> attribute nodes of the source
element are imported, and the generated <code>Attr</code> nodes
are attached to the generated <code>Element</code>. Default
attributes are <emph>not</emph> copied, though if the document
being imported into defines default attributes for this element
name, those are assigned. If the <code>importNode</code>
<code>deep</code> parameter was set to <code>true</code>, the
<termref def="dt-descendant">descendants</termref> of the source element are recursively imported
and the resulting nodes reassembled to form the corresponding
subtree.</p>
</def>
</gitem>
<gitem>
<label>ENTITY_NODE</label>
<def><p><code>Entity</code> nodes can be imported, however in the
current release of the DOM the <code>DocumentType</code> is
readonly. Ability to add these imported nodes to a
<code>DocumentType</code> will be considered for addition to a
future release of the DOM.</p>
<p>On import, the <code>publicId</code>, <code>systemId</code>,
and <code>notationName</code> attributes are copied. If a
<code>deep</code> import is requested, the <termref def="dt-descendant">descendants</termref> of the
the source <code>Entity</code> are recursively imported and the
resulting nodes reassembled to form the corresponding
subtree.</p>
</def>
</gitem>
<gitem>
<label>ENTITY_REFERENCE_NODE</label>
<def><p>Only the <code>EntityReference</code> itself is copied,
even if a <code>deep</code> import is requested, since the
source and destination documents might have defined the entity
differently. If the document being imported into provides a
definition for this entity name, its value is assigned.</p>
</def>
</gitem>
<gitem>
<label>NOTATION_NODE</label>
<def><p><code>Notation</code> nodes can be imported, however in the
current release of the DOM the <code>DocumentType</code> is
readonly. Ability to add these imported nodes to a
<code>DocumentType</code> will be considered for addition to a
future release of the DOM.</p>
<p>On import, the <code>publicId</code> and
<code>systemId</code> attributes are copied.</p>
<p>Note that the <code>deep</code> parameter has no effect on
<code>Notation</code> nodes since they never have any
children.</p>
</def>
</gitem>
<gitem>
<label>PROCESSING_INSTRUCTION_NODE</label>
<def><p>The imported node copies its <code>target</code> and
<code>data</code> values from those of the source node.</p>
</def>
</gitem>
<gitem>
<label>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</label>
<def><p>These three types of nodes inheriting from
<code>CharacterData</code> copy their <code>data</code> and
<code>length</code> attributes from those of the source
node.</p>
</def>
</gitem>
</glist>
</p>
</descr>
<parameters>
<param name="importedNode" type="Node" attr="in">
<descr><p>The node to import.</p></descr>
</param>
<param name="deep" type="boolean" attr="in">
<descr><p>If <code>true</code>, recursively import the subtree
under the specified node; if <code>false</code>, import only
the node itself, as explained above. This has no effect on
<code>Attr</code>, <code>EntityReference</code>, and
<code>Notation</code> nodes.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr><p>The imported node that belongs to this
<code>Document</code>.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NOT_SUPPORTED_ERR: Raised if the type of node being imported
is not supported.</p></descr>
</exception>
</raises>
</method>
<method name="createElementNS" id="ID-DocCrElNS" since="DOM Level 2">
<descr><p>Creates an element of the given qualified name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the element to create.</p>
</descr>
</param>
<param name="qualifiedName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-qualifiedname'>qualified name</termref>
of the element type to instantiate.</p>
</descr>
</param>
</parameters>
<returns type="Element">
<descr><p>A new <code>Element</code> object with the following
attributes:</p>
<table summary='Layout table: the first cell the name property,
the second cell contains his initial value'>
<tbody>
<tr><th>Attribute</th><th>Value</th></tr>
<tr><td><code>Node.nodeName</code></td>
<td><code>qualifiedName</code></td>
</tr>
<tr><td><code>Node.namespaceURI</code></td>
<td><code>namespaceURI</code></td></tr>
<tr><td><code>Node.prefix</code></td><td>prefix, extracted from
<code>qualifiedName</code>, or <code>null</code> if there is no
prefix</td></tr>
<tr><td><code>Node.localName</code></td><td><termref
def='dt-localname'>local name</termref>, extracted from
<code>qualifiedName</code></td></tr>
<tr><td><code>Element.tagName</code></td>
<td><code>qualifiedName</code></td>
</tr>
</tbody>
</table>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.</p>
<p>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
malformed, if the <code>qualifiedName</code> has a prefix and
the <code>namespaceURI</code> is <code>null</code>, or if
the <code>qualifiedName</code> has a prefix that
is "xml" and the <code>namespaceURI</code> is different
from "<loc href='&xml-ns;'>&xml-ns;</loc>" <bibref
ref='Namespaces'/>.</p>
</descr>
</exception>
</raises>
</method>
<method name="createAttributeNS" id="ID-DocCrAttrNS" since="DOM Level 2">
<descr><p>Creates an attribute of the given qualified name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to create.</p>
</descr>
</param>
<param name="qualifiedName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-qualifiedname'>qualified name</termref>
of the attribute to instantiate.</p>
</descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>A new <code>Attr</code> object with the following
attributes:</p>
<table summary='Layout table: the first cell the name property,
the second cell contains his initial value'>
<tbody>
<tr><th>Attribute</th><th>Value</th></tr>
<tr><td><code>Node.nodeName</code></td><td>qualifiedName</td>
</tr>
<tr><td><code>Node.namespaceURI</code></td>
<td><code>namespaceURI</code></td></tr>
<tr><td><code>Node.prefix</code></td><td>prefix, extracted from
<code>qualifiedName</code>, or <code>null</code> if there is no
prefix</td></tr>
<tr><td><code>Node.localName</code></td><td><termref
def='dt-localname'>local name</termref>, extracted from
<code>qualifiedName</code></td></tr>
<tr><td><code>Attr.name</code></td>
<td><code>qualifiedName</code></td></tr>
<tr><td><code>Node.nodeValue</code></td>
<td>the empty string</td></tr>
</tbody>
</table>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.</p>
<p>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
malformed, if the <code>qualifiedName</code> has a prefix and
the <code>namespaceURI</code> is <code>null</code>, if the
<code>qualifiedName</code> has a prefix that is
"xml" and the <code>namespaceURI</code> is different from
"<loc href='&xml-ns;'>&xml-ns;</loc>", or if the
<code>qualifiedName</code> is "xmlns" and the
<code>namespaceURI</code> is different from
"<loc href='&xmlns-ns;'>&xmlns-ns;</loc>".</p>
</descr>
</exception>
</raises>
</method>
<method name="getElementsByTagNameNS" id="ID-getElBTNNS" since="DOM Level 2">
<descr><p>Returns a <code>NodeList</code> of all the <code>Elements</code>
with a given <termref def='dt-localname'>local name</termref> and
namespace URI in the order in which they are encountered in a
preorder traversal of the <code>Document</code> tree.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the elements to match on. The special value "*" matches all
namespaces.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
elements to match on. The special value "*" matches all local
names.</p>
</descr>
</param>
</parameters>
<returns type="NodeList">
<descr><p>A new <code>NodeList</code> object containing all the matched
<code>Elements</code>.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<method name="getElementById" id="ID-getElBId" since="DOM Level 2">
<descr><p>Returns the <code>Element</code> whose <code>ID</code>
is given by <code>elementId</code>. If no such element exists, returns
<code>null</code>. Behavior is not defined if more than one element has
this <code>ID</code>.
<note><p>The DOM implementation must have information that says which
attributes are of type ID. Attributes with the name "ID" are not of type ID unless
so defined. Implementations that do not know whether attributes are of type
ID or not are expected to return <code>null</code>.</p></note></p></descr>
<parameters>
<param name="elementId" type="DOMString" attr="in">
<descr><p>The unique <code>id</code> value for an element.</p></descr>
</param>
</parameters>
<returns type="Element">
<descr><p>The matching element.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
</interface>
+128
View File
@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ DOMImplementation object description ]-->
<!-- $Date$ $Revision$ -->
<interface name="DOMImplementation" id="ID-102161490">
<descr><p>The <code>DOMImplementation</code> interface provides a
number of methods for performing operations that are independent
of any particular instance of the document object model.</p>
</descr>
<method name="hasFeature" id="ID-5CED94D7">
<descr><p>Test if the DOM implementation implements a
specific feature.</p></descr>
<parameters>
<param name="feature" type="DOMString" attr="in">
<descr><p>The name of the feature to test (case-insensitive). The
values used by DOM features are defined throughout the DOM Level 2 specifications and listed in
the <specref ref="ID-Conformance"/> section. The name must be an
<termref def="dt-XML-name">XML name</termref>. To avoid possible
conflicts, as a convention, names referring to features defined
outside the DOM specification should be made unique by reversing the name of
the Internet domain name of the person (or the organization that the
person belongs to) who defines the feature, component by component,
and using this as a prefix. For instance, the W3C SVG Working Group
defines the feature "org.w3c.dom.svg".</p></descr>
</param>
<param name="version" type="DOMString" attr="in">
<descr><p>This is the version number of the feature to test. In Level
2, the string can be either "2.0" or "1.0". If the version is not
specified, supporting any version of the feature causes the method
to return <code>true</code>.</p></descr>
</param>
</parameters>
<returns type="boolean">
<descr><p><code>true</code> if the feature is implemented in the
specified version, <code>false</code> otherwise.</p></descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<!-- ****** DOM Level 2 additions ****** -->
<method name="createDocumentType" id="Level-2-Core-DOM-createDocType"
since="DOM Level 2">
<descr><p>Creates an empty <code>DocumentType</code> node. Entity
declarations and notations are not made available. Entity reference
expansions and default attribute additions do not occur. It is expected
that a future version of the DOM will provide a way for populating a
<code>DocumentType</code>.</p>
<p>HTML-only DOM implementations do not need to
implement this method.</p>
</descr>
<parameters>
<param name="qualifiedName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-qualifiedname'>qualified name</termref>
of the document type to be created. </p>
</descr>
</param>
<param name="publicId" type="DOMString" attr="in">
<descr><p>The external subset public identifier.</p>
</descr>
</param>
<param name="systemId" type="DOMString" attr="in">
<descr><p>The external subset system identifier.</p>
</descr>
</param>
</parameters>
<returns type="DocumentType">
<descr><p>A new <code>DocumentType</code> node with
<code>Node.ownerDocument</code> set to <code>null</code>.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.</p>
<p>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
malformed.</p>
</descr>
</exception>
</raises>
</method>
<method name="createDocument" id="Level-2-Core-DOM-createDocument"
since="DOM Level 2">
<descr><p>Creates an XML <code>Document</code> object of the specified type
with its document element. HTML-only DOM implementations do not need to
implement this method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the document element to create.</p>
</descr>
</param>
<param name="qualifiedName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-qualifiedname'>qualified name</termref>
of the document element to be created.</p>
</descr>
</param>
<param name="doctype" type="DocumentType" attr="in">
<descr><p>The type of document to be created or <code>null</code>.</p>
<p>When <code>doctype</code> is not <code>null</code>, its
<code>Node.ownerDocument</code> attribute is set to the document
being created.</p>
</descr>
</param>
</parameters>
<returns type="Document">
<descr><p>A new <code>Document</code> object.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.</p>
<p>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
malformed, if the <code>qualifiedName</code> has a prefix and
the <code>namespaceURI</code> is <code>null</code>, or if
the <code>qualifiedName</code> has a prefix that
is "xml" and the <code>namespaceURI</code> is different
from "<loc href='&xml-ns;'>&xml-ns;</loc>" <bibref
ref='Namespaces'/>.</p>
<p>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
been used with a different document or was created from a different
implementation.</p>
</descr>
</exception>
</raises>
</method>
</interface>
+462
View File
@@ -0,0 +1,462 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ Element object description ]-->
<interface name="Element" inherits="Node" id="ID-745549614">
<descr><p>The <code>Element</code> interface represents an <termref def="dt-element">element</termref> in an HTML
or XML document. Elements may have attributes associated with them; since the
<code>Element</code> interface inherits from <code>Node</code>, the generic
<code>Node</code> interface attribute <code>attributes</code> may be used
to retrieve the set of all attributes for an element. There are methods on
the <code>Element</code> interface to retrieve either an <code>Attr</code>
object by name or an attribute value by name. In XML, where an attribute
value may contain entity references, an <code>Attr</code> object should be
retrieved to examine the possibly fairly complex sub-tree representing the
attribute value. On the other hand, in HTML, where all attributes have
simple string values, methods to directly access an attribute value can
safely be used as a <termref def="dt-convenience">convenience</termref>.</p>
<note><p>In DOM Level 2, the method <code>normalize</code> is
inherited from the <code>Node</code> interface where it was
moved.</p></note>
</descr>
<attribute type="DOMString" name="tagName" readonly="yes" id="ID-104682815">
<descr><p>The name of the element. For example, in:
<eg role="code">
&lt;elementExample id="demo"&gt;
...
&lt;/elementExample&gt; ,
</eg>
<code>tagName</code> has the value
<code>"elementExample"</code>. Note that this is
case-preserving in XML, as are all of the operations of the DOM.
The HTML DOM returns the <code>tagName</code> of an HTML element
in the canonical uppercase form, regardless of the case in the
source HTML document. </p>
</descr>
</attribute>
<method name="getAttribute" id="ID-666EE0F9">
<descr><p>Retrieves an attribute value by name.</p></descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the attribute to retrieve.</p></descr>
</param>
</parameters>
<returns type="DOMString">
<descr><p>The <code>Attr</code> value as a string, or the empty string if
that attribute does not have a specified or default value.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setAttribute" id="ID-F68F082">
<descr><p>Adds a new attribute. If an attribute with that name is already
present in the element, its value is changed to be that of the value
parameter. This value is a simple string; it is not parsed as it is being
set. So any markup (such as syntax to be recognized as an entity
reference) is treated as literal text, and needs to be appropriately
escaped by the implementation when it is written out. In order to assign
an attribute value that contains entity references, the user must create
an <code>Attr</code> node plus any <code>Text</code> and
<code>EntityReference</code> nodes, build the appropriate subtree, and
use <code>setAttributeNode</code> to assign it as the value of an
attribute.</p>
<p>To set an attribute with a qualified name and namespace URI, use
the <code>setAttributeNS</code> method.</p>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the attribute to create or alter.</p></descr>
</param>
<param name="value" type="DOMString" attr="in">
<descr><p>Value to set in string form.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified name contains
an illegal character.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="removeAttribute" id="ID-6D6AC0F9">
<descr><p>Removes an attribute by name. If the removed attribute is known
to have a default value, an attribute immediately appears containing
the default value as well as the corresponding namespace URI,
local name, and prefix when applicable.</p>
<p>To remove an attribute by local name and namespace URI, use
the <code>removeAttributeNS</code> method.</p>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the attribute to remove.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="getAttributeNode" id="ID-217A91B8">
<descr><p>Retrieves an attribute node by name.</p>
<p>To retrieve an attribute node by qualified name and namespace URI, use
the <code>getAttributeNodeNS</code> method.</p>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name (<code>nodeName</code>) of the attribute to
retrieve.</p></descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>The <code>Attr</code> node with the specified
name (<code>nodeName</code>) or <code>null</code> if there is no such
attribute.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setAttributeNode" id="ID-887236154">
<descr><p>Adds a new attribute node. If an attribute with that name
(<code>nodeName</code>) is already present in the element, it is replaced
by the new one.</p>
<p>To add a new attribute node with a qualified name and namespace URI,
use the <code>setAttributeNodeNS</code> method.</p>
</descr>
<parameters>
<param name="newAttr" type="Attr" attr="in">
<descr><p>The <code>Attr</code> node to add to the attribute
list.</p></descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>If the <code>newAttr</code> attribute replaces
an existing attribute, the replaced <code>Attr</code> node is
returned, otherwise <code>null</code> is returned.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was
created from a different document than the one that created the
element.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
<p>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already
an attribute of another <code>Element</code> object. The
DOM user must explicitly clone <code>Attr</code>
nodes to re-use them in other elements.</p></descr>
</exception>
</raises>
</method>
<method name="removeAttributeNode" id="ID-D589198">
<descr><p>Removes the specified attribute node. If the removed
<code>Attr</code> has a default value it is immediately
replaced. The replacing attribute has the same namespace URI
and local name, as well as the original prefix, when
applicable.</p>
</descr>
<parameters>
<param name="oldAttr" type="Attr" attr="in">
<descr><p>The <code>Attr</code> node to remove from the attribute
list.</p></descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>The <code>Attr</code> node that was removed.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.</p>
<p>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute of
the element.</p>
</descr>
</exception>
</raises>
</method>
<method name="getElementsByTagName" id="ID-1938918D">
<descr><p>Returns a <code>NodeList</code> of all <termref def="dt-descendant">descendant</termref>
<code>Elements</code> with a given tag name, in the order in which they
are encountered in a preorder traversal of this <code>Element</code>
tree.</p></descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the tag to match on. The special value "*"
matches all tags.</p></descr>
</param>
</parameters>
<returns type="NodeList">
<descr><p>A list of matching <code>Element</code> nodes.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<!-- ****** DOM Level 2 additions ****** -->
<method name="getAttributeNS" id="ID-ElGetAttrNS" since="DOM Level 2">
<descr><p>Retrieves an attribute value by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to retrieve.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
attribute to retrieve.</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr><p>The <code>Attr</code> value as a string, or the empty string if
that attribute does not have a specified or default value.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setAttributeNS" id="ID-ElSetAttrNS" since="DOM Level 2">
<descr><p>Adds a new attribute. If an attribute with the same local name
and namespace URI is already present on the element, its prefix is
changed to be the prefix part of the <code>qualifiedName</code>, and
its value is changed to be the <code>value</code> parameter. This value
is a simple string; it is not parsed as it is being set. So any markup
(such as syntax to be recognized as an entity reference) is treated as
literal text, and needs to be appropriately escaped by the
implementation when it is written out. In order to assign an attribute
value that contains entity references, the user must create an
<code>Attr</code> node plus any <code>Text</code> and
<code>EntityReference</code> nodes, build the appropriate subtree, and
use <code>setAttributeNodeNS</code> or <code>setAttributeNode</code> to
assign it as the value of an attribute.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to create or alter.</p>
</descr>
</param>
<param name="qualifiedName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-qualifiedname'>qualified name</termref>
of the attribute to create or alter.</p>
</descr>
</param>
<param name="value" type="DOMString" attr="in">
<descr><p>The value to set in string form.</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
<p>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
malformed, if the <code>qualifiedName</code> has a prefix and
the <code>namespaceURI</code> is <code>null</code>, if the
<code>qualifiedName</code> has a prefix that is
"xml" and the <code>namespaceURI</code> is different from
"<loc href='&xml-ns;'>&xml-ns;</loc>", or if the
<code>qualifiedName</code> is "xmlns" and the
<code>namespaceURI</code> is different from
"<loc href='&xmlns-ns;'>&xmlns-ns;</loc>".</p>
</descr>
</exception>
</raises>
</method>
<method name="removeAttributeNS" id="ID-ElRemAtNS" since="DOM Level 2">
<descr><p>Removes an attribute by local name and namespace URI. If
the removed attribute has a default value it is immediately
replaced. The replacing attribute has the same namespace URI
and local name, as well as the original prefix.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to remove.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
attribute to remove.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="getAttributeNodeNS" id="ID-ElGetAtNodeNS" since="DOM Level 2">
<descr><p>Retrieves an <code>Attr</code> node by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to retrieve.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
attribute to retrieve.</p>
</descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>The <code>Attr</code> node with the specified attribute local
name and namespace URI or <code>null</code> if there is no such
attribute.</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setAttributeNodeNS" id="ID-ElSetAtNodeNS" since="DOM Level 2">
<descr><p>Adds a new attribute. If an attribute with that local name and
that namespace URI is already present in the element, it is replaced by
the new one.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="newAttr" type="Attr" attr="in">
<descr><p>The <code>Attr</code> node to add to the attribute list.</p>
</descr>
</param>
</parameters>
<returns type="Attr">
<descr><p>If the <code>newAttr</code> attribute replaces an existing
attribute with the same <termref def='dt-localname'>local
name</termref> and <termref def='dt-namespaceURI'>namespace
URI</termref>, the replaced <code>Attr</code> node is
returned, otherwise <code>null</code> is returned.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was
created from a different document than the one that created the
element.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
<p>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
attribute of another <code>Element</code> object. The DOM user
must explicitly clone <code>Attr</code> nodes to re-use them in
other elements.</p>
</descr>
</exception>
</raises>
</method>
<method name="getElementsByTagNameNS" id="ID-A6C90942" since="DOM Level 2">
<descr><p>Returns a <code>NodeList</code> of all the <termref def="dt-descendant">descendant</termref>
<code>Elements</code> with a given local name and namespace URI in the
order in which they are encountered in a preorder traversal of this
<code>Element</code> tree.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the elements to match on. The special value "*" matches all
namespaces.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
elements to match on. The special value "*" matches all local
names.</p>
</descr>
</param>
</parameters>
<returns type="NodeList">
<descr><p>A new <code>NodeList</code> object containing all the matched
<code>Elements</code>.</p>
</descr>
</returns>
<raises>
<!-- Throws no exceptions -->
</raises>
</method>
<method name="hasAttribute" id="ID-ElHasAttr" since="DOM Level 2">
<descr><p>Returns <code>true</code> when an attribute with a given name is
specified on this element or has a default value, <code>false</code>
otherwise.</p>
</descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The name of the attribute to look for.</p></descr>
</param>
</parameters>
<returns type="boolean">
<descr><p><code>true</code> if an attribute with the given name is
specified on this element or has a default value, <code>false</code>
otherwise.</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="hasAttributeNS" id="ID-ElHasAttrNS" since="DOM Level 2">
<descr><p>Returns <code>true</code> when an attribute with a given local
name and namespace URI is specified on this element or has a default
value, <code>false</code> otherwise. HTML-only DOM implementations do
not need to implement this method.</p>
</descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the attribute to look for.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
attribute to look for.</p>
</descr>
</param>
</parameters>
<returns type="boolean">
<descr><p><code>true</code> if an attribute with the given local name and
namespace URI is specified or has a default value on this element,
<code>false</code> otherwise.</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface name="EntityReference" inherits="Node" id="ID-11C98490">
<descr><p><code>EntityReference</code> objects may be inserted into the
structure model when an entity reference is in the source document, or
when the user wishes to insert an entity reference. Note that character
references and references to predefined entities are considered to be
expanded by the HTML or XML processor so that characters are represented
by their Unicode equivalent rather than by an entity reference. Moreover,
the XML processor may completely expand references to entities while
building the structure model, instead of providing
<code>EntityReference</code> objects. If it does provide such objects,
then for a given <code>EntityReference</code> node, it may be that there
is no <code>Entity</code> node representing the referenced entity. If
such an <code>Entity</code> exists, then the subtree of the
<code>EntityReference</code> node is in general a copy of the
<code>Entity</code> node subtree. However, this may not be true when an
entity contains an unbound <termref def='dt-namespaceprefix'>namespace
prefix</termref>. In such a case, because the namespace prefix resolution
depends on where the entity reference is, the <termref def="dt-descendant">descendants</termref> of the
<code>EntityReference</code> node may be bound to different
<termref def='dt-namespaceURI'>namespace URIs</termref>.</p>
<p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and
all their <termref def="dt-descendant">descendants</termref> are
<termref def="dt-readonly-node">readonly</termref>.</p>
</descr>
</interface>
+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface name="Entity" inherits="Node" id="ID-527DCFF2">
<descr><p>This interface represents an entity, either parsed or
unparsed, in an XML document. Note that this models the entity
itself <emph>not</emph> the entity declaration. <code>Entity</code>
declaration modeling has been left for a later Level of the DOM
specification.</p>
<p>The <code>nodeName</code> attribute that is inherited from
<code>Node</code> contains the name of the entity.</p>
<p>An XML processor may choose to completely expand entities before
the structure model is passed to the DOM; in this case there will
be no <code>EntityReference</code> nodes in the document tree.</p>
<p>XML does not mandate that a non-validating XML processor read
and process entity declarations made in the external subset or
declared in external parameter entities. This means
that parsed entities declared in the external subset
need not be expanded by some classes of applications, and that
the replacement value of the entity may not be available. When the
replacement value is available, the corresponding
<code>Entity</code> node's child list represents the structure of
that replacement text. Otherwise, the child list is empty.</p>
<p>The DOM Level 2 does not support editing <code>Entity</code>
nodes; if a user wants to make changes to the contents of an
<code>Entity</code>, every related <code>EntityReference</code> node
has to be replaced in the structure model by a clone of the
<code>Entity</code>'s contents, and then the desired changes must be made
to each of those clones instead. <code>Entity</code> nodes and all their
<termref def="dt-descendant">descendants</termref> are <termref def="dt-readonly-node">readonly</termref>.</p>
<p>An <code>Entity</code> node does not have any parent.</p>
<note><p>If the entity contains an unbound <termref
def='dt-namespaceprefix'>namespace prefix</termref>, the
<code>namespaceURI</code> of the corresponding node in the
<code>Entity</code> node subtree is <code>null</code>. The same is
true for <code>EntityReference</code> nodes that refer to this entity,
when they are created using the <code>createEntityReference</code>
method of the <code>Document</code> interface. The DOM Level 2 does not
support any mechanism to resolve namespace prefixes.</p></note>
</descr>
<attribute readonly="yes" name="publicId" type="DOMString" id="ID-D7303025">
<descr><p>The public identifier associated with the entity, if
specified. If the public identifier was not specified, this
is <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" name="systemId" type="DOMString" id="ID-D7C29F3E">
<descr><p>The system identifier associated with the entity, if
specified. If the system identifier was not specified, this
is <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" name="notationName" type="DOMString" id="ID-6ABAEB38">
<descr><p>For unparsed entities, the name of the notation for the
entity. For parsed entities, this is <code>null</code>. </p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ Exceptions description ]-->
<exception name="DOMException" id="ID-17189187">
<descr>
<p>DOM operations only raise exceptions in &quot;exceptional&quot;
circumstances, i.e., when an operation is impossible
to perform (either for logical reasons, because data is lost, or
because the implementation has become unstable). In general, DOM methods
return specific error values in ordinary
processing situations, such as out-of-bound errors when using
<code>NodeList</code>.
</p>
<p>Implementations should raise other exceptions under other circumstances.
For example, implementations should raise an implementation-dependent
exception if a <code>null</code> argument is passed. </p>
<p>Some languages and object systems do not support the concept of
exceptions. For such systems, error conditions may be indicated using
native error reporting mechanisms. For some bindings, for example, methods
may return error codes similar to those listed in the corresponding method
descriptions.</p>
</descr>
<component id="ID-146F692A" name="code">
<typename>unsigned short</typename>
</component>
</exception>
<group id="ID-258A00AF" name="ExceptionCode">
<descr><p>An integer indicating the type of error generated.</p>
<note><p>Other numeric codes are reserved for W3C for possible future
use.</p></note>
</descr>
<constant name="INDEX_SIZE_ERR" type="unsigned short" value="1">
<descr><p>If index or size is negative, or greater than the
allowed value</p></descr>
</constant>
<constant name="DOMSTRING_SIZE_ERR" type="unsigned short" value="2">
<descr><p>If the specified range of text does not fit into a
DOMString</p></descr>
</constant>
<constant name="HIERARCHY_REQUEST_ERR" type="unsigned short" value="3">
<descr><p>If any node is inserted somewhere it doesn't belong</p></descr>
</constant>
<constant name="WRONG_DOCUMENT_ERR" type="unsigned short" value="4">
<descr><p>If a node is used in a different document than the one that
created it (that doesn't support it)</p></descr>
</constant>
<constant name="INVALID_CHARACTER_ERR" type="unsigned short" value="5">
<descr><p>If an invalid or illegal character is specified, such as in a
name. See <xspecref href="&xml-spec;#NT-Char">production 2</xspecref>
in the XML specification for the definition of a legal character, and
<xspecref href="&xml-spec;#NT-Name">production 5</xspecref>
for the definition of a legal name character.</p></descr></constant>
<constant name="NO_DATA_ALLOWED_ERR" type="unsigned short" value="6">
<descr><p>If data is specified for a node which does not support
data</p></descr></constant>
<constant name="NO_MODIFICATION_ALLOWED_ERR" type="unsigned short" value="7">
<descr><p>If an attempt is made to modify an object where modifications are
not allowed</p></descr></constant>
<constant name="NOT_FOUND_ERR" type="unsigned short" value="8">
<descr><p>If an attempt is made to reference a node in a context where it
does not exist</p></descr></constant>
<constant name="NOT_SUPPORTED_ERR" type="unsigned short" value="9">
<descr><p>If the implementation does not support the requested
type of object or operation.</p></descr></constant>
<constant name="INUSE_ATTRIBUTE_ERR" type="unsigned short" value="10">
<descr><p>If an attempt is made to add an attribute that is already in use
elsewhere</p></descr></constant>
<!-- ****** DOM Level 2 additions ****** -->
<constant name="INVALID_STATE_ERR" type="unsigned short" value="11"
since="DOM Level 2">
<descr><p>If an attempt is made to use an object that is not, or is no
longer, usable.</p></descr></constant>
<constant name="SYNTAX_ERR" type="unsigned short" value="12"
since="DOM Level 2">
<descr><p>If an invalid or illegal string is specified.</p></descr></constant>
<constant name="INVALID_MODIFICATION_ERR" type="unsigned short" value="13"
since="DOM Level 2">
<descr><p>If an attempt is made to modify the type of the underlying
object.</p></descr></constant>
<constant name="NAMESPACE_ERR" type="unsigned short" value="14"
since="DOM Level 2">
<descr><p>If an attempt is made to create or change an object in a way
which is incorrect with regard to namespaces.</p></descr>
</constant>
<constant name="INVALID_ACCESS_ERR" type="unsigned short" value="15"
since="DOM Level 2">
<descr><p>If a parameter or an operation is not supported by the
underlying object.</p></descr>
</constant>
</group>
@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ NamedNodeMap object description ]-->
<interface name="NamedNodeMap" id="ID-1780488922">
<descr><p>Objects implementing the <code>NamedNodeMap</code> interface are
used to represent collections of nodes that can be accessed by name. Note
that <code>NamedNodeMap</code> does not inherit from
<code>NodeList</code>; <code>NamedNodeMaps</code> are not maintained in
any particular order. Objects contained in an object implementing
<code>NamedNodeMap</code> may also be accessed by an ordinal index, but
this is simply to allow convenient enumeration of the contents of a
<code>NamedNodeMap</code>, and does not imply that the DOM specifies an
order to these Nodes. </p>
<p><code>NamedNodeMap</code> objects in the DOM are <termref
def="td-live">live</termref>.</p>
</descr>
<method name="getNamedItem" id="ID-1074577549">
<descr><p>Retrieves a node specified by name.</p></descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The <code>nodeName</code> of a node to retrieve.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>A <code>Node</code> (of any type) with the specified
<code>nodeName</code>, or <code>null</code> if it does not
identify any node in this map.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setNamedItem" id="ID-1025163788">
<descr>
<p>Adds a node using its <code>nodeName</code> attribute. If a node with
that name is already present in this map, it is replaced by the new
one.</p>
<p>As the <code>nodeName</code> attribute is used to
derive the name which the node must be stored under, multiple
nodes of certain types (those that have a "special" string
value) cannot be stored as the names would clash. This is seen
as preferable to allowing nodes to be aliased.</p>
</descr>
<parameters>
<param name="arg" type="Node" attr="in">
<descr><p>A node to store in this map. The node will later be
accessible using the value of its <code>nodeName</code>
attribute.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>If the new <code>Node</code> replaces an existing node the
replaced <code>Node</code> is returned, otherwise <code>null</code> is
returned.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created
from a different document than the one that created this map.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.</p>
<p>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
<code>Attr</code> that is already an attribute of another
<code>Element</code> object. The DOM user must explicitly clone
<code>Attr</code> nodes to re-use them in other elements.</p></descr>
</exception>
</raises>
</method>
<method name="removeNamedItem" id="ID-D58B193">
<descr><p>Removes a node specified by name. When this map contains the
attributes attached to an element, if the removed attribute is
known to have a default value, an attribute immediately appears
containing the default value as well as the corresponding namespace
URI, local name, and prefix when applicable.</p></descr>
<parameters>
<param name="name" type="DOMString" attr="in">
<descr><p>The <code>nodeName</code> of the node to remove.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr><p>The node removed from this map if a node with such a name
exists.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NOT_FOUND_ERR: Raised if there is no node named
<code>name</code> in this map.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="item" id="ID-349467F9">
<descr><p>Returns the <code>index</code>th item in the map.
If <code>index</code> is greater than or equal to the number
of nodes in this map, this returns <code>null</code>.</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into this map.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>The node at the <code>index</code>th position in the map, or
<code>null</code> if that is not a valid index.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<attribute type="unsigned long" readonly = "yes" name="length"
id="ID-6D0FB19E">
<descr><p>The number of nodes in this map. The range of valid child node
indices is <code>0</code> to <code>length-1</code>
inclusive. </p></descr>
</attribute>
<method name="getNamedItemNS" id="ID-getNamedItemNS" since="DOM Level 2">
<descr><p>Retrieves a node specified by local name and namespace
URI. HTML-only DOM implementations do not need to implement this
method.</p></descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the node to retrieve.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
node to retrieve.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>A <code>Node</code> (of any type) with the specified
local name and namespace URI, or <code>null</code> if they do not
identify any node in this map.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setNamedItemNS" id="ID-setNamedItemNS" since="DOM Level 2">
<descr>
<p>Adds a node using its <code>namespaceURI</code> and
<code>localName</code>. If a node with that namespace URI and that
local name is already present in this map, it is replaced by the new
one.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p>
</descr>
<parameters>
<param name="arg" type="Node" attr="in">
<descr><p>A node to store in this map. The node will later be
accessible using the value of its <code>namespaceURI</code> and
<code>localName</code> attributes.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>If the new <code>Node</code> replaces an existing node the
replaced <code>Node</code> is returned, otherwise <code>null</code>
is returned.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created
from a different document than the one that created this map.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.</p>
<p>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
<code>Attr</code> that is already an attribute of another
<code>Element</code> object. The DOM user must explicitly clone
<code>Attr</code> nodes to re-use them in other elements.</p></descr>
</exception>
</raises>
</method>
<method name="removeNamedItemNS" id="ID-removeNamedItemNS"
since="DOM Level 2">
<descr><p>Removes a node specified by local name and namespace URI. A
removed attribute may be known to have a default value when this map
contains the attributes attached to an element, as returned by the
attributes attribute of the <code>Node</code> interface. If so, an
attribute immediately appears containing the default value as well as
the corresponding namespace URI, local name, and prefix when
applicable.</p>
<p>HTML-only DOM implementations do not need to implement this
method.</p></descr>
<parameters>
<param name="namespaceURI" type="DOMString" attr="in">
<descr><p>The <termref def='dt-namespaceURI'>namespace URI</termref> of
the node to remove.</p>
</descr>
</param>
<param name="localName" type="DOMString" attr="in">
<descr><p>The <termref def='dt-localname'>local name</termref> of the
node to remove.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr><p>The node removed from this map if a node with such a local
name and namespace URI exists.</p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NOT_FOUND_ERR: Raised if there is no node with the specified
<code>namespaceURI</code> and <code>localName</code> in this
map.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ NodeList object description ]-->
<interface name="NodeList" id="ID-536297177">
<descr><p>The <code>NodeList</code> interface provides the abstraction of an
ordered collection of nodes, without defining or constraining how this
collection is implemented. <code>NodeList</code> objects in the DOM are
<termref def="td-live">live</termref>.</p>
<p>The items in the <code>NodeList</code> are accessible via an
integral index, starting from 0.</p>
</descr>
<method name="item" id="ID-844377136">
<descr><p>Returns the <code>index</code>th item in the collection.
If <code>index</code> is greater than or equal to the number
of nodes in the list, this returns <code>null</code>.</p></descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into the collection.</p></descr>
</param>
</parameters>
<returns type="Node">
<descr><p>The node at the <code>index</code>th position in the
<code>NodeList</code>, or <code>null</code> if that is not a
valid index.</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<attribute type="unsigned long" readonly = "yes" name="length" id="ID-203510337">
<descr><p>The number of nodes in the list. The range of valid child node
indices is 0 to <code>length-1</code> inclusive. </p></descr>
</attribute>
</interface>
+548
View File
@@ -0,0 +1,548 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--[ Node object description ]-->
<interface name="Node" id="ID-1950641247">
<descr>
<p>The <code>Node</code> interface is the primary datatype for the entire Document Object Model.
It represents a single node in the document tree. While all objects
implementing the <code>Node</code> interface expose methods for dealing with children, not all objects
implementing the <code>Node</code> interface may have children. For example, <code>Text</code> nodes may not have children, and adding children to such nodes results
in a <code>DOMException</code> being raised.</p>
<p>The attributes <code>nodeName</code>, <code>nodeValue</code> and <code>attributes</code> are included as a mechanism to get at node information without casting
down to the specific derived interface. In cases where there is no obvious
mapping of these attributes for a specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an <code>Element</code> or <code>attributes</code> for a <code>Comment</code>), this returns <code>null</code>. Note that the specialized interfaces may contain additional and more
convenient mechanisms to get and set the relevant information.</p>
</descr>
<group id="ID-1841493061" name="NodeType">
<descr>
<p>An integer indicating which type of node this is.</p>
<note>
<p>Numeric codes up to 200 are reserved to W3C for possible future
use.</p>
</note>
</descr>
<constant name="ELEMENT_NODE" type="unsigned short" value="1">
<descr>
<p>The node is an <code>Element</code>.</p>
</descr>
</constant>
<constant name="ATTRIBUTE_NODE" type="unsigned short" value="2">
<descr>
<p>The node is an <code>Attr</code>.</p>
</descr>
</constant>
<constant name="TEXT_NODE" type="unsigned short" value="3">
<descr>
<p>The node is a <code>Text</code> node.</p>
</descr>
</constant>
<constant name="CDATA_SECTION_NODE" type="unsigned short" value="4">
<descr>
<p>The node is a <code>CDATASection</code>.</p>
</descr>
</constant>
<constant name="ENTITY_REFERENCE_NODE" type="unsigned short" value="5">
<descr>
<p>The node is an <code>EntityReference</code>.</p>
</descr>
</constant>
<constant name="ENTITY_NODE" type="unsigned short" value="6">
<descr>
<p>The node is an <code>Entity</code>.</p>
</descr>
</constant>
<constant name="PROCESSING_INSTRUCTION_NODE" type="unsigned short"
value="7">
<descr>
<p>The node is a <code>ProcessingInstruction</code>.</p>
</descr>
</constant>
<constant name="COMMENT_NODE" type="unsigned short" value="8">
<descr>
<p>The node is a <code>Comment</code>.</p>
</descr>
</constant>
<constant name="DOCUMENT_NODE" type="unsigned short" value="9">
<descr>
<p>The node is a <code>Document</code>.</p>
</descr>
</constant>
<constant name="DOCUMENT_TYPE_NODE" type="unsigned short" value="10">
<descr>
<p>The node is a <code>DocumentType</code>.</p>
</descr>
</constant>
<constant name="DOCUMENT_FRAGMENT_NODE" type="unsigned short" value="11">
<descr>
<p>The node is a <code>DocumentFragment</code>.</p>
</descr>
</constant>
<constant name="NOTATION_NODE" type="unsigned short" value="12">
<descr>
<p>The node is a <code>Notation</code>.</p>
</descr>
</constant>
</group>
<p>The values of <code>nodeName</code>, <code>nodeValue</code>, and <code>attributes</code> vary according to the node type as follows:
<table summary='Layout table:
the first cell contains the name of the interface,
the second contains the value of the nodeName attribute for this interface,
the third contains the value of the nodeValue attribute for this interface and
the fourth contains the value of the attributes attribute for this interface'
border="1">
<tbody>
<tr>
<th>Interface</th>
<th>nodeName</th>
<th>nodeValue</th>
<th>attributes</th>
</tr>
<tr>
<td>Attr</td>
<td>name of attribute</td>
<td>value of attribute</td>
<td>null</td>
</tr>
<tr>
<td>CDATASection</td>
<td>#cdata-section</td>
<td>content of the CDATA Section</td>
<td>null</td>
</tr>
<tr>
<td>Comment</td>
<td>#comment</td>
<td>content of the comment</td>
<td>null</td>
</tr>
<tr>
<td>Document</td>
<td>#document</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>DocumentFragment</td>
<td>#document-fragment</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>DocumentType</td>
<td>document type name</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>Element</td>
<td>tag name</td>
<td>null</td>
<td>NamedNodeMap</td>
</tr>
<tr>
<td>Entity</td>
<td>entity name</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>EntityReference</td>
<td>name of entity referenced</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>Notation</td>
<td>notation name</td>
<td>null</td>
<td>null</td>
</tr>
<tr>
<td>ProcessingInstruction</td>
<td>target</td>
<td>entire content excluding the target</td>
<td>null</td>
</tr>
<tr>
<td>Text</td>
<td>#text</td>
<td>content of the text node</td>
<td>null</td>
</tr>
</tbody>
</table> </p>
<attribute type="DOMString" readonly="yes" name="nodeName" id="ID-F68D095">
<descr>
<p>The name of this node, depending on its type; see the table above.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="nodeValue" id="ID-F68D080">
<descr>
<p>The value of this node, depending on its type; see the table above.
When it is defined to be <code>null</code>, setting it has no effect.</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.</p>
</descr>
</exception>
</setraises>
<getraises>
<exception name="DOMException">
<descr>
<p>DOMSTRING_SIZE_ERR: Raised when it would return more characters
than fit in a <code>DOMString</code> variable on the implementation platform.</p>
</descr>
</exception>
</getraises>
</attribute>
<attribute type="unsigned short" name="nodeType" readonly="yes"
id="ID-111237558">
<descr>
<p>A code representing the type of the underlying object, as defined
above.</p>
</descr>
</attribute>
<attribute type="Node" readonly="yes" name="parentNode" id="ID-1060184317">
<descr>
<p>The <termref def="dt-parent">parent</termref> of this node. All nodes,
except <code>Attr</code>, <code>Document</code>, <code>DocumentFragment</code>, <code>Entity</code>, and <code>Notation</code> may have a parent. However, if a node has just been created and not yet
added to the tree, or if it has been removed from the tree, this is <code>null</code>.</p>
</descr>
</attribute>
<attribute type="NodeList" readonly="yes" name="childNodes"
id="ID-1451460987">
<descr>
<p>A <code>NodeList</code> that contains all children of this node. If there are no children, this
is a <code>NodeList</code> containing no nodes.</p>
</descr>
</attribute>
<attribute readonly="yes" type="Node" name="firstChild" id="ID-169727388">
<descr>
<p>The first child of this node. If there is no such node, this returns <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" type="Node" name="lastChild" id="ID-61AD09FB">
<descr>
<p>The last child of this node. If there is no such node, this returns <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" type="Node" name="previousSibling"
id="ID-640FB3C8">
<descr>
<p>The node immediately preceding this node. If there is no such node,
this returns <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" type="Node" name="nextSibling" id="ID-6AC54C2F">
<descr>
<p>The node immediately following this node. If there is no such node,
this returns <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" type="NamedNodeMap" name="attributes"
id="ID-84CF096">
<descr>
<p>A <code>NamedNodeMap</code> containing the attributes of this node (if it is an <code>Element</code>) or <code>null</code> otherwise. </p>
</descr>
</attribute>
<attribute readonly="yes" type="Document" name="ownerDocument"
id="node-ownerDoc" version="DOM Level 2">
<descr>
<p>The <code>Document</code> object associated with this node. This is also the <code>Document</code> object used to create new nodes. When this node is a <code>Document</code> or a <code>DocumentType</code> which is not used with any <code>Document</code> yet, this is <code>null</code>.</p>
</descr>
</attribute>
<method name="insertBefore" id="ID-952280727">
<descr>
<p>Inserts the node <code>newChild</code> before the existing child node <code>refChild</code>. If <code>refChild</code> is <code>null</code>, insert <code>newChild</code> at the end of the list of children.</p>
<p>If <code>newChild</code> is a <code>DocumentFragment</code> object, all of its children are inserted, in the same order, before <code>refChild</code>. If the <code>newChild</code> is already in the tree, it is first removed.</p>
</descr>
<parameters>
<param name="newChild" type="Node" attr="in">
<descr>
<p>The node to insert.</p>
</descr>
</param>
<param name="refChild" type="Node" attr="in">
<descr>
<p>The reference node, i.e., the node before which the new node must
be inserted.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr>
<p>The node being inserted.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the <code>newChild</code> node, or if the node to insert is one of this node's
<termref def="dt-ancestor">ancestors</termref>.</p>
<p>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this
node.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if
the parent of the node being inserted is readonly.</p>
<p>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of this node.</p>
</descr>
</exception>
</raises>
</method>
<method name="replaceChild" id="ID-785887307">
<descr>
<p>Replaces the child node <code>oldChild</code> with <code>newChild</code> in the list of children, and returns the <code>oldChild</code> node.</p>
<p>If <code>newChild</code> is a <code>DocumentFragment</code> object, <code>oldChild</code> is replaced by all of the <code>DocumentFragment</code> children, which are inserted in the same order. If the <code>newChild</code> is already in the tree, it is first removed.</p>
</descr>
<parameters>
<param name="newChild" type="Node" attr="in">
<descr>
<p>The new node to put in the child list.</p>
</descr>
</param>
<param name="oldChild" type="Node" attr="in">
<descr>
<p>The node being replaced in the list.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr>
<p>The node replaced.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the <code>newChild</code> node, or if the node to put in is one of this node's
<termref def="dt-ancestor">ancestors</termref>.</p>
<p>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this
node.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
the new node is readonly.</p>
<p>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of this node.</p>
</descr>
</exception>
</raises>
</method>
<method name="removeChild" id="ID-1734834066">
<descr>
<p>Removes the child node indicated by <code>oldChild</code> from the list of children, and returns it.</p>
</descr>
<parameters>
<param name="oldChild" type="Node" attr="in">
<descr>
<p>The node being removed.</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr>
<p>The node removed.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
<p>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of this node.</p>
</descr>
</exception>
</raises>
</method>
<method name="appendChild" id="ID-184E7107">
<descr>
<p>Adds the node <code>newChild</code> to the end of the list of children of this node. If the <code>newChild</code> is already in the tree, it is first removed.</p>
</descr>
<parameters>
<param name="newChild" type="Node" attr="in">
<descr>
<p>The node to add.</p>
<p>If it is a <code>DocumentFragment</code> object, the entire contents of the document fragment are moved into the
child list of this node</p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr>
<p>The node added.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does
not allow children of the type of the <code>newChild</code> node, or if the node to append is one of this node's
<termref def="dt-ancestor">ancestors</termref>.</p>
<p>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this
node.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="hasChildNodes" id="ID-810594187">
<descr>
<p>Returns whether this node has any children.</p>
</descr>
<parameters> <!-- No parameters -->
</parameters>
<returns type="boolean">
<descr>
<p> <code>true</code> if this node has any children, <code>false</code> otherwise.</p>
</descr>
</returns>
<raises> <!-- No exceptions -->
</raises>
</method>
<method name="cloneNode" id="ID-3A0ED0A4">
<descr>
<p>Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes. The duplicate node has no parent; (<code>parentNode</code> is <code>null</code>.).</p>
<p>Cloning an <code>Element</code> copies all attributes and their values, including those generated by
the XML processor to represent defaulted attributes, but this method does not
copy any text it contains unless it is a deep clone, since the text is
contained in a child <code>Text</code> node. Cloning an <code>Attribute</code> directly, as opposed to be cloned as part of an <code>Element</code> cloning operation, returns a specified attribute (<code>specified</code> is <code>true</code>). Cloning any other type of node simply returns a copy of this
node.</p>
<p>Note that cloning an immutable subtree results in a mutable copy, but
the children of an <code>EntityReference</code> clone are <termref def="dt-readonly-node">readonly</termref>. In
addition, clones of unspecified <code>Attr</code> nodes are specified. And, cloning <code>Document</code>, <code>DocumentType</code>, <code>Entity</code>, and <code>Notation</code> nodes is implementation dependent.</p>
</descr>
<parameters>
<param name="deep" type="boolean" attr="in">
<descr>
<p>If <code>true</code>, recursively clone the subtree under the specified node; if <code>false</code>, clone only the node itself (and its attributes, if it is an <code>Element</code>). </p>
</descr>
</param>
</parameters>
<returns type="Node">
<descr>
<p>The duplicate node.</p>
</descr>
</returns>
<raises> <!-- No exceptions -->
</raises>
</method>
<!-- ****** DOM Level 2 additions ****** -->
<method id="ID-normalize" name="normalize" version="DOM Level 2">
<descr>
<p>Puts all <code>Text</code> nodes in the full depth of the sub-tree underneath this <code>Node</code>, including attribute nodes, into a "normal" form where only structure
(e.g., elements, comments, processing instructions, CDATA sections, and entity
references) separates <code>Text</code> nodes, i.e., there are neither adjacent <code>Text</code> nodes nor empty <code>Text</code> nodes. This can be used to ensure that the DOM view of a document is
the same as if it were saved and re-loaded, and is useful when operations (such
as XPointer <bibref ref="XPointer"/> lookups) that depend on a particular
document tree structure are to be used.</p>
<note>
<p>In cases where the document contains <code>CDATASections</code>, the normalize operation alone may not be sufficient, since XPointers
do not differentiate between <code>Text</code> nodes and <code>CDATASection</code> nodes.</p>
</note>
</descr>
<parameters> <!-- No parameters -->
</parameters>
<returns type="void">
<descr>
<p></p>
</descr>
</returns>
<raises> <!-- No exceptions -->
</raises>
</method>
<method name="isSupported" id="Level-2-Core-Node-supports"
since="DOM Level 2">
<descr>
<p>Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.</p>
</descr>
<parameters>
<param name="feature" type="DOMString" attr="in">
<descr>
<p>The name of the feature to test. This is the same name which can
be passed to the method <code>hasFeature</code> on <code>DOMImplementation</code>.</p>
</descr>
</param>
<param name="version" type="DOMString" attr="in">
<descr>
<p>This is the version number of the feature to test. In Level 2,
version 1, this is the string "2.0". If the version is not specified,
supporting any version of the feature will cause the method to return <code>true</code>.</p>
</descr>
</param>
</parameters>
<returns type="boolean">
<descr>
<p>Returns <code>true</code> if the specified feature is supported on this node, <code>false</code> otherwise.</p>
</descr>
</returns>
<raises> <!-- No exceptions -->
</raises>
</method>
<attribute readonly="yes" type="DOMString" name="namespaceURI"
id="ID-NodeNSname" since="DOM Level 2">
<descr>
<p>The <termref def="dt-namespaceURI">namespace URI</termref> of this
node, or <code>null</code> if it is unspecified.</p>
<p>This is not a computed value that is the result of a namespace lookup
based on an examination of the namespace declarations in scope. It is merely
the namespace URI given at creation time.</p>
<p>For nodes of any type other than <code>ELEMENT_NODE</code> and <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 method, such as <code>createElement</code> from the <code>Document</code> interface, this is always <code>null</code>.</p>
<note>
<p>Per the <emph>Namespaces in XML</emph> Specification
<bibref ref="Namespaces"/> an attribute does not inherit its namespace from the
element it is attached to. If an attribute is not explicitly given a namespace,
it simply has no namespace.</p>
</note>
</descr>
</attribute>
<attribute type="DOMString" name="prefix" id="ID-NodeNSPrefix"
since="DOM Level 2">
<descr>
<p>The <termref def="dt-namespaceprefix">namespace prefix</termref> of
this node, or <code>null</code> if it is unspecified.</p>
<p>Note that setting this attribute, when permitted, changes the <code>nodeName</code> attribute, which holds the <termref def="dt-qualifiedname">qualified
name</termref>, as well as the <code>tagName</code> and <code>name</code> attributes of the <code>Element</code> and <code>Attr</code> interfaces, when applicable.</p>
<p>Note also that changing the prefix of an attribute that is known to
have a default value, does not make a new attribute with the default value and
the original prefix appear, since the <code>namespaceURI</code> and <code>localName</code> do not change.</p>
<p>For nodes of any type other than <code>ELEMENT_NODE</code> and <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 method, such as <code>createElement</code> from the <code>Document</code> interface, this is always <code>null</code>.</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
illegal character.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
<p>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is malformed, if the <code>namespaceURI</code> of this node is <code>null</code>, if the specified prefix is "xml" and the <code>namespaceURI</code> of this node is different from "<loc href="&xml-ns;">&xml-ns;</loc>",
if this node is an attribute and the specified prefix is "xmlns" and the <code>namespaceURI</code> of this node is different from "<loc
href="&xmlns-ns;">&xmlns-ns;</loc>", or if this node is an attribute and the <code>qualifiedName</code> of this node is "xmlns" <bibref ref="Namespaces"/>.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute readonly="yes" type="DOMString" name="localName"
id="ID-NodeNSLocalN" since="DOM Level 2">
<descr>
<p>Returns the local part of the <termref
def="dt-qualifiedname">qualified name</termref> of this node.</p>
<p>For nodes of any type other than <code>ELEMENT_NODE</code> and <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 method, such as <code>createElement</code> from the <code>Document</code> interface, this is always <code>null</code>.</p>
</descr>
</attribute>
<method name="hasAttributes" id="ID-NodeHasAttrs" since="DOM Level 2">
<descr>
<p>Returns whether this node (if it is an element) has any
attributes.</p>
</descr>
<parameters> <!-- No parameters -->
</parameters>
<returns type="boolean">
<descr>
<p><code>true</code> if this node has any attributes, <code>false</code> otherwise.</p>
</descr>
</returns>
<raises> <!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface name="Notation" inherits="Node" id="ID-5431D1B9">
<!-- $Date$ $Revision$ -->
<descr>
<p>This interface represents a notation declared in the DTD. A notation
either declares, by name, the format of an unparsed entity (see <xspecref
href="&xml-spec;#Notations">section 4.7</xspecref>
of the XML 1.0 specification <bibref ref="XML"/>), or is used for formal
declaration of
processing instruction targets (see <xspecref
href="&xml-spec;#sec-pi">section 2.6</xspecref> of the XML 1.0
specification <bibref ref="XML"/>). The <code>nodeName</code> attribute
inherited from
<code>Node</code> is set to the declared name of the notation.</p>
<p>The DOM Level 1 does not support editing <code>Notation</code>
nodes; they are therefore
<termref def="dt-readonly-node">readonly</termref>.</p>
<p>A <code>Notation</code> node does not have any parent.</p>
</descr>
<attribute readonly="yes" name="publicId" type="DOMString" id="ID-54F2B4D0">
<descr><p>The public identifier of this notation. If the
public identifier was not specified, this is <code>null</code>.</p>
</descr>
</attribute>
<attribute readonly="yes" name="systemId" type="DOMString" id="ID-E8AAB1D0">
<descr><p>The system identifier of this notation. If the
system identifier was not specified, this is <code>null</code>.</p>
</descr>
</attribute>
</interface>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ ProcessingInstruction object description ]-->
<!-- $Date$ $Revision$ -->
<interface name="ProcessingInstruction" inherits="Node" id="ID-1004215813">
<descr><p>The <code>ProcessingInstruction</code> interface
represents a &quot;processing instruction&quot;, used in XML
as a way to keep processor-specific information in the text of the
document.</p></descr>
<attribute readonly="yes" type="DOMString" name="target" id="ID-1478689192">
<descr><p>The target of this processing instruction. XML defines this as
being the first <termref def="dt-token">token</termref> following the
markup that begins the processing instruction.</p></descr>
</attribute>
<attribute type="DOMString" name="data" id="ID-837822393">
<descr><p>The content of this processing instruction. This
is from the first non white space character after the target
to the character immediately preceding the <code>?&gt;</code>.</p>
</descr>
<setraises>
<exception name="DOMException">
<descr><p>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is
readonly.</p></descr>
</exception>
</setraises>
</attribute>
</interface>
+48
View File
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--[ Text object description ]-->
<!-- $Date$ $Revision$ -->
<interface name="Text" inherits="CharacterData" id="ID-1312295772">
<descr>
<p>The <code>Text</code> interface inherits from <code>CharacterData</code> and represents the textual content (termed
<xspecref href="&xml-spec;#syntax">character data</xspecref> in XML) of an <code>Element</code> or <code>Attr</code>. If there is no markup inside an element's content, the text is
contained in a single object implementing the <code>Text</code> interface that is the only child of the element. If there is markup, it
is parsed into the <termref def="dt-infoitem">information items</termref>
(elements, comments, etc.) and <code>Text</code> nodes that form the list of children of the element.</p>
<p>When a document is first made available via the DOM, there is only one <code>Text</code> node for each block of text. Users may create adjacent <code>Text</code> nodes that represent the contents of a given element without any
intervening markup, but should be aware that there is no way to represent the
separations between these nodes in XML or HTML, so they will not (in general)
persist between DOM editing sessions. The <code>normalize()</code> method on <code>Node</code> merges any such adjacent <code>Text</code> objects into a single node for each block of text.</p>
</descr>
<method name="splitText" id="ID-38853C1D">
<descr>
<p>Breaks this node into two nodes at the specified <code>offset</code>, keeping both in the tree as <termref
def="dt-sibling">siblings</termref>. After being split, this node will contain
all the content up to the <code>offset</code> point. A new node of the same type, which contains all the content at
and after the <code>offset</code> point, is returned. If the original node had a parent node, the new
node is inserted as the next <termref def="dt-sibling">sibling</termref> of the
original node. When the <code>offset</code> is equal to the length of this node, the new node has no data.</p>
</descr>
<parameters>
<param name="offset" type="unsigned long" attr="in">
<descr>
<p>The <termref def="dt-16-bit-unit">16-bit unit</termref> offset at
which to split, starting from <code>0</code>.</p>
</descr>
</param>
</parameters>
<returns type="Text">
<descr>
<p>The new node, of the same type as this node.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>INDEX_SIZE_ERR: Raised if the specified offset is negative or
greater than the number of 16-bit units in <code>data</code>.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
+181
View File
@@ -0,0 +1,181 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Core">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Core Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor">
<name>Arnaud Le Hors</name>
<affiliation>W3C team contact until October 1999, then IBM</affiliation>
</author>
<author role="editor">
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C, team contact (from November 1999)</affiliation>
</author>
<author role="editor"> <name>Lauren Wood</name>
<affiliation>SoftQuad Software Inc., WG Chair</affiliation>
</author>
<author role="editor">
<name>Gavin Nicol</name>
<affiliation>Inso EPS (for DOM Level 1)</affiliation>
</author>
<author role="editor">
<name>Jonathan Robie</name>
<affiliation>Texcel Research and Software AG (for DOM Level 1)</affiliation>
</author>
<author role="editor">
<name>Mike Champion</name>
<affiliation>ArborText and Software AG (for DOM Level 1 from November 20,
1997)</affiliation>
</author>
<author role="editor">
<name>Steve Byrne</name>
<affiliation>JavaSoft (for DOM Level 1 until November 19,
1997)</affiliation>
</author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Core, a platform-
and language-neutral interface that allows programs and scripts to dynamically
access and update the content and structure of documents. The Document
Object Model Level 2 Core builds on the Document Object Model Level 1 Core.</p>
<p>The DOM Level 2 Core is made of a set of core interfaces to create and
manipulate the structure and contents of a document. The Core also contains
specialized interfaces dedicated to XML.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
&introduction;
</front>
<body>
&core;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
&core-changes;
&i18nfunctions;
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for
the Level 2 Document Object Model Core definitions.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<!--
******************************************************
| CORE OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL Core dom w3c.org?>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java Language <bibref ref='Java'/>
binding for the Level 2 Document Object Model Core.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<!--
******************************************************
| CORE JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA Core org.w3c dom?>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Core
definitions.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<!--
******************************************************
| CORE ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA Core?>
</div1>
&contributors;
&glossary;
&references;
&index;
</back>
</spec>
+149
View File
@@ -0,0 +1,149 @@
<?xml version="1.0" encoding='UTF-8'?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF DOM I18N *
*************************************************************************
-->
<div1 id="i18n">
<head>Accessing code point boundaries</head>
<orglist>
<member>
<name>Mark Davis</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Lauren Wood</name>
<affiliation>SoftQuad Software Inc.</affiliation>
</member>
</orglist><?GENERATE-MINI-TOC?>
<div2 id="i18n-introduction">
<head>Introduction</head>
<p>
This appendix is an informative, not a normative, part of the Level 2 DOM
specification.
</p>
<p>
Characters are represented in Unicode by numbers called <i>code
points</i> (also called <i>scalar values</i>). These numbers can range
from 0 up to 1,114,111 = 10FFFF<sub>16</sub> (although some of these values are
illegal). Each code point can be directly encoded with a 32-bit code unit.
This encoding is termed UCS-4 (or UTF-32).
The DOM specification, however, uses UTF-16, in which the most frequent
characters (which have values less than FFFF<sub>16</sub>) are represented
by a single 16-bit code unit, while characters above FFFF<sub>16</sub>
use a special pair of code units called a <i>surrogate pair</i>. For more information,
see <bibref ref="Unicode"/> or the Unicode Web site.
</p>
<p>
While indexing by code points as opposed to code units is not
common in programs, some specifications such as XPath (and therefore XSLT
and XPointer) use code point
indices. For interfacing with such formats it is recommended
that the programming language provide string processing methods for
converting code point indices to code unit indices and back. Some
languages do not provide these functions natively; for these it is
recommended that the native <code>String</code> type that is bound to
<code>DOMString</code> be extended to enable this conversion. An example
of how such an API might look is supplied below.
</p>
<note>
<p>
Since these methods are supplied as an illustrative example of the type
of functionality that is required, the names of the methods,
exceptions, and interface may differ from those given here.
</p>
</note>
</div2>
<div2 id="i18n-methods">
<head>Methods</head>
<definitions>
<interface id="i18n-methods-StringExtend" name="StringExtend">
<descr>
<p>Extensions to a language's native String class or interface</p>
</descr>
<method id="i18n-methods-StringExtend-findOffset16" name="findOffset16">
<descr>
<p>Returns the UTF-16 offset that corresponds to a UTF-32 offset.
Used for random access.</p>
<note>
<p>
You can always round-trip from a UTF-32 offset to a UTF-16
offset and back. You can round-trip from a UTF-16 offset to
a UTF-32 offset and back if and only if the offset16 is not
in the middle of a surrogate pair. Unmatched surrogates
count as a single UTF-16 value.
</p>
</note>
</descr>
<parameters>
<param name="offset32" type="int" attr="in">
<descr>
<p>
UTF-32 offset.
</p>
</descr>
</param>
</parameters>
<returns type="int">
<descr>
<p>UTF-16 offset</p>
</descr>
</returns>
<raises>
<exception name="StringIndexOutOfBoundsException">
<descr>
<p>
if <code>offset32</code> is out of bounds.
</p>
</descr>
</exception>
</raises>
</method>
<method id="i18n-methods-StringExtend-findOffset32" name="findOffset32">
<descr>
<p>
Returns the UTF-32 offset corresponding to a UTF-16 offset. Used
for random access. To find the UTF-32 length of a string, use:
<eg>len32 = findOffset32(source, source.length());</eg>
</p>
<note>
<p>
If the UTF-16 offset is into the middle of a surrogate pair,
then the UTF-32 offset of the <emph>end</emph> of the pair is
returned; that is, the index of the char after the end of the
pair. You can always round-trip from a UTF-32 offset to a UTF-16
offset and back. You can round-trip from a UTF-16 offset to a
UTF-32 offset and back if and only if the offset16 is not in
the middle of a surrogate pair. Unmatched surrogates count as a
single UTF-16 value.
</p>
</note>
</descr>
<parameters>
<param attr="in" type="int" name="offset16">
<descr>
<p>UTF-16 offset</p>
</descr>
</param>
</parameters>
<returns type="int">
<descr>
<p>UTF-32 offset</p>
</descr>
</returns>
<raises>
<exception name="StringIndexOutOfBoundsException">
<descr>
<p>if offset16 is out of bounds.</p>
</descr>
</exception>
</raises>
</method>
</interface>
</definitions>
</div2>
</div1>
+431
View File
@@ -0,0 +1,431 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF DOM INTRODUCTION *
*************************************************************************
-->
<div1 id="Introduction">
<head>What is the Document Object Model?</head>
<orglist role="editors">
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>Lauren Wood</name>
<affiliation>SoftQuad Software Inc., WG Chair</affiliation>
</member>
<member>
<name>Jonathan Robie</name>
<affiliation>Texcel (for DOM Level 1)</affiliation>
</member>
</orglist>
<div2 id="ID-E7C3082">
<head>Introduction</head>
<p>The Document Object Model (DOM) is an application programming interface
(<termref def="dt-API">API</termref>) for valid <termref def="dt-HTML">HTML</termref> and
well-formed <termref def="dt-XML">XML</termref> documents. It defines the logical structure of documents and
the way a document is accessed and manipulated. In the DOM specification,
the term "document" is used in the broad sense - increasingly, XML is being used as a
way of representing many different kinds of information that may
be stored in diverse systems, and much of this would traditionally
be seen as data rather than as documents. Nevertheless, XML presents
this data as documents, and the DOM may be used to manage this data.</p>
<p>With the Document
Object Model, programmers can build documents, navigate
their structure, and add, modify, or delete elements and content.
Anything found in an HTML or XML document can be accessed,
changed, deleted, or added using the Document Object Model,
with a few exceptions - in particular, the DOM <termref
def="dt-interface">interfaces</termref> for
the XML internal and external subsets have not yet been specified.</p>
<p>As a W3C specification, one important objective for the Document
Object Model is to provide a standard programming interface that
can be used in a wide variety of environments and <termref
def="dt-application">applications</termref>.
The DOM is designed to be used with any programming
language. In order to provide a precise, language-independent
specification of the DOM interfaces, we have chosen to define
the specifications in Object Management Group (OMG) IDL <bibref
ref="OMGIDL"/>, as defined in the CORBA 2.3.1 specification <bibref
ref="CORBA"/>. In addition to the OMG IDL specification, we provide
<termref def="dt-lang-binding">language bindings</termref> for Java <bibref ref="Java"/> and ECMAScript <bibref
ref="ECMAScript"/> (an industry-standard scripting
language based on JavaScript <bibref ref="JavaScript"/> and JScript
<bibref ref='JScript'/>).</p>
<note><p>OMG IDL is used only as a language-independent and
implementation-neutral way to specify <termref def="dt-interface">interfaces</termref>. Various other
IDLs could have been used (<bibref ref="COM"/>, <bibref
ref="JavaIDL"/>, <bibref ref="MSIDL"/>, ...). In general, IDLs
are designed for specific computing environments. The Document Object
Model can be implemented in any computing environment, and does not
require the object binding runtimes generally associated with
such IDLs.
</p></note>
</div2>
<div2 id="ID-E7C30821">
<head>What the Document Object Model is</head>
<p>The DOM is a programming <termref def="dt-API">API</termref> for documents.
It is based on an object structure that closely resembles the structure of the
documents it <termref def="dt-model">models</termref>. For instance, consider this table, taken
from an HTML document: </p>
<eg role="code">
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Shady Grove&lt;/TD&gt;
&lt;TD&gt;Aeolian&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Over the River, Charlie&lt;/TD&gt;
&lt;TD&gt;Dorian&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
</eg>
<p>A graphical representation of the DOM of the example table is:
<graphic source="./images/table.gif" alt="graphical representation of the
DOM of the example table"/>
</p>
<p>In the DOM, documents have a logical
structure which is very much like a tree; to be more precise, which is
like a &quot;forest&quot; or &quot;grove&quot;,
which can contain more than one tree. Each document contains zero or one
doctype nodes, one root element node, and zero or more comments
or processing instructions; the root element serves as the root
of the element tree for the document. However, the DOM
does not specify that documents must be <emph>implemented</emph> as a
tree or a grove<!--but not the same as an sgml grove-->, nor
does it specify how the relationships among objects be
implemented. The DOM is a logical model that may be implemented in any
convenient manner. In this
specification, we use the term <emph>structure model</emph> to
describe the tree-like representation of a document.
We also use the term "tree" when referring to the arrangement of
those information items which can be reached by using "tree-walking"
methods; (this does not include attributes).
One important property of DOM structure models
is <emph>structural isomorphism</emph>: if any two Document
Object Model implementations are used to create a representation
of the same document, they will create the same structure model,
in accordance with the XML Information Set <bibref ref="InfoSet"/>.</p>
<note><p>There may be some variations depending on the parser being
used to build the DOM. For instance, the DOM may not contain
whitespaces in element content if the parser discards them.</p>
</note>
<p>The name &quot;Document Object Model&quot; was chosen because
it is an &quot;<termref def="dt-object-model">object model</termref>&quot; in the traditional
object oriented design sense: documents are modeled using
objects, and the model encompasses not only the structure of a
document, but also the behavior of a document and the objects
of which it is composed. In other words, the nodes in the
above diagram do not represent a data structure, they
represent objects, which have functions and identity. As an
object model, the DOM identifies:</p>
<ulist>
<item><p>the interfaces and objects used to represent and manipulate
a document</p></item>
<item><p>the semantics of these interfaces and objects - including
both behavior and attributes</p></item>
<item><p>the relationships and collaborations among these interfaces
and objects</p></item>
</ulist>
<p>The structure of SGML documents has traditionally been
represented by an abstract <termref def="dt-datamodel">data model</termref>, not by an object model.
In an abstract <termref def="dt-datamodel">data model</termref>, the model is centered around the
data. In object oriented programming languages, the data itself
is encapsulated in objects that hide the data, protecting it
from direct external manipulation. The functions associated with
these objects determine how the objects may be manipulated, and
they are part of the object model.</p>
</div2>
<div2 id="ID-E7C30822">
<head>What the Document Object Model is not</head>
<p>This section is designed to give a more precise understanding
of the DOM by distinguishing it from other
systems that may seem to be like it.</p>
<ulist>
<item><p>The Document Object Model is not a binary specification.
DOM programs written in the same language binding will be
source code compatible across platforms, but the DOM
does not define any form of binary interoperability.</p></item>
<item><p>The Document Object Model is not a way of persisting objects
to XML or HTML. Instead of specifying how objects may be
represented in XML, the DOM specifies how
XML and HTML documents are represented as objects, so that
they may be used in object oriented programs.</p></item>
<item><p>The Document Object Model is not a set of data structures;
it is an <termref def="dt-object-model">object model</termref> that specifies interfaces. Although this
document contains diagrams showing parent/child relationships,
these are logical relationships defined by the programming
interfaces, not representations of any particular internal
data structures.</p></item>
<item><p>The Document Object Model does not define what information in a
document is relevant or how information in a document is
structured. For XML, this is specified by the W3C XML Information Set
<bibref ref="InfoSet"/>. The DOM is simply an <termref def="dt-API">API</termref> to this information
set.</p></item>
<item><p>The Document Object Model, despite its name, is not a
competitor to the Component Object Model (COM). COM, like
CORBA, is a language independent way to specify interfaces and
objects; the DOM is a set of interfaces and
objects designed for managing HTML and XML documents. The DOM
may be implemented using language-independent systems like COM
or CORBA; it may also be implemented using language-specific
bindings like the Java or ECMAScript bindings specified in
this document.</p></item>
</ulist>
</div2>
<div2 id="ID-E7C30823">
<head>Where the Document Object Model came from</head>
<p>The DOM originated as a specification to
allow JavaScript scripts and Java programs to be portable among
Web browsers. "Dynamic HTML" was the immediate ancestor of the
Document Object Model, and it was originally thought of largely
in terms of browsers. However, when the DOM
Working Group was formed at W3C, it was also joined by vendors in other
domains, including HTML or XML editors and document
repositories. Several of these vendors had worked with SGML
before XML was developed; as a result, the DOM
has been influenced by SGML Groves and the HyTime standard. Some
of these vendors had also developed their own object models for
documents in order to provide an API for SGML/XML
editors or document repositories, and these object models have
also influenced the DOM.</p>
</div2>
<div2 id="ID-E7C30824"><head>Entities and the DOM Core</head>
<p>In the fundamental DOM interfaces, there are no objects representing
entities. Numeric character references, and references to the
pre-defined entities in HTML and XML, are replaced by the
single character that makes up the entity's replacement.
For example, in:
</p>
<eg role="code">
&lt;p&gt;This is a dog &amp;amp; a cat&lt;/p&gt;
</eg>
<p>
the "&amp;amp;" will be replaced by the character "&amp;", and the text
in the P element will form a single continuous sequence of
characters. Since numeric character references and pre-defined entities
are not recognized as such in CDATA sections, or in the SCRIPT and STYLE
elements in HTML, they are not replaced by the single character they
appear to refer to. If the example above were enclosed in a CDATA
section, the "&amp;amp;" would not be replaced by "&amp;"; neither would
the &lt;p&gt; be recognized as a start tag. The representation of general
entities, both internal and external, are defined within the
extended (XML) interfaces of DOM Level 1 <bibref ref='DOM-Level-1'/>.</p>
<p>
Note: When a DOM representation of a document is serialized
as XML or HTML text, applications will need to check each
character in text data to see if it needs to be escaped
using a numeric or pre-defined entity. Failing to do so
could result in invalid HTML or XML. Also, <termref
def="dt-implementation">implementations</termref> should be
aware of the fact that serialization into a character encoding
("charset") that does not fully cover ISO 10646 may fail if there are
characters in markup or CDATA sections that are not present in the
encoding.</p>
</div2>
<div2 id="ID-Conformance">
<head>Conformance</head>
<p>
This section explains the different levels of conformance to DOM Level 2.
DOM Level 2 consists of 14 modules. It is possible to conform to DOM
Level 2, or to a DOM Level 2 module.
</p>
<p>
An implementation is DOM Level 2 conformant if it supports the Core
module defined in this document (see <specref ref="ID-BBACDC08"/>). An
implementation conforms to a DOM Level 2 module if it supports all the
interfaces for that module and the associated semantics.
</p>
<p>
Here is the complete list of DOM Level 2.0 modules and the features used
by them. Feature names are case-insensitive.
</p>
<glist>
<gitem>
<label>Core module</label>
<def>
<p>
defines the feature <xspecref
href="core.html#ID-BBACDC08">"Core"</xspecref>.
</p>
</def>
</gitem>
<gitem>
<label>XML module</label>
<def>
<p>
defines the feature <xspecref
href="core.html#ID-E067D597">"XML"</xspecref>.
</p>
</def>
</gitem>
<gitem>
<label>HTML module</label>
<def>
<p>defines the feature "HTML". (see <bibref ref="DOMHTML-inf"/>).</p>
<note>
<p>At time of publication, this DOM Level 2 module is not yet a W3C Recommendation.</p>
</note>
</def>
</gitem>
<gitem>
<label>Views module</label>
<def>
<p>defines the feature <xspecref
href='&views.latest.url;/views.html'>"Views"</xspecref> in <bibref ref="DOMViews-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Style Sheets module</label>
<def>
<p>defines the feature <xspecref
href='&style.latest.url;/stylesheets.html'>"StyleSheets"</xspecref> in <bibref ref="DOMStyleSheets-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>CSS module</label>
<def>
<p>defines the feature <xspecref
href='&style.latest.url;/css.html'>"CSS"</xspecref> in <bibref ref="DOMCSS-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>CSS2 module</label>
<def>
<p>defines the feature <xspecref
href='&style.latest.url;/css.html'>"CSS2"</xspecref> in <bibref ref="DOMCSS-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Events module</label>
<def>
<p>defines the feature <xspecref
href='&events.latest.url;/events.html'>"Events"</xspecref> in <bibref ref="DOMEvents-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>User interface Events module</label>
<def>
<p>defines the feature <xspecref
href='&events.latest.url;/events.html'>"UIEvents"</xspecref> in <bibref ref="DOMEvents-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Mouse Events module</label>
<def>
<p>defines the feature <xspecref
href='&events.latest.url;/events.html'>"MouseEvents"</xspecref> in <bibref ref="DOMEvents-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Mutation Events module</label>
<def>
<p>defines the feature <xspecref
href='&events.latest.url;/events.html'>"MutationEvents"</xspecref> in <bibref ref="DOMEvents-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>HTML Events module</label>
<def>
<p>defines the feature <xspecref
href='&events.latest.url;/events.html'>"HTMLEvents"</xspecref> in <bibref ref="DOMEvents-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Range module</label>
<def>
<p>defines the feature <xspecref
href='&traversal-range.latest.url;/ranges.html'>"Range"</xspecref> in <bibref ref="DOMRange-inf"/>.</p>
</def>
</gitem>
<gitem>
<label>Traversal module</label>
<def>
<p>defines the feature <xspecref
href='&traversal-range.latest.url;/traversal.html'>"Traversal"</xspecref> in <bibref ref="DOMTraversal-inf"/>.</p>
</def>
</gitem>
</glist>
<p>
A DOM implementation must not return <code>"true"</code> to the
<code>hasFeature(feature, version)</code> <termref
def="dt-method">method</termref> of the <code>DOMImplementation</code>
interface for that feature unless the implementation conforms to that
module. The <code>version</code> number for all features used in DOM
Level 2.0 is "2.0".
</p>
</div2>
<div2 id="ID-E7C30826"><head>DOM Interfaces and DOM Implementations</head>
<p>The DOM specifies interfaces which may be used to manage XML or
HTML documents. It is important to realize that these interfaces
are an abstraction - much like "abstract base classes" in C++,
they are a means of specifying a way to access and manipulate an
application's internal representation of a document. Interfaces
do not imply a particular concrete
implementation. Each DOM application is free to maintain
documents in any convenient representation, as long as the
interfaces shown in this specification are supported. Some
DOM implementations will be existing programs that use the
DOM interfaces to access software written long before the
DOM specification existed. Therefore, the DOM is designed
to avoid implementation dependencies; in particular,</p>
<olist>
<item><p>Attributes defined in the IDL do not imply concrete
objects which must have specific data members - in the
language bindings, they are translated to a pair of
get()/set() functions, not to a data member. Read-only
attributes have only a get() function in the language
bindings. </p>
</item>
<item><p>DOM applications may provide additional interfaces
and objects not found in this specification and still be
considered DOM conformant.</p></item>
<item><p>Because we specify interfaces and not the actual
objects that are to be created, the DOM cannot know what
constructors to call for an implementation. In general,
DOM users call the createX() methods on the Document
class to create document structures, and DOM
implementations create their own internal representations
of these structures in their implementations of the
createX() functions.
</p></item>
</olist>
<p>
The Level 1 interfaces were extended to provide both Level 1 and Level 2
functionality.
</p>
<p>
DOM implementations in languages other than Java or ECMAScript may
choose bindings that are appropriate and natural for their language and
run time environment. For example, some systems may need to create a
Document2 class which inherits from Document and contains the new methods
and attributes.
</p>
<p>DOM Level 2 does not specify multithreading mechanisms.</p>
</div2>
</div1>
<!--
*************************************************************************
* END OF DOM INTRODUCTION *
*************************************************************************
-->
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- DocumentEvent interface -->
<interface name="DocumentEvent" id="Events-DocumentEvent" since="DOM Level 2">
<descr>
<p>
The <code>DocumentEvent</code> interface provides a mechanism by
which the user can create an Event of a type supported by the implementation.
It is expected that the <code>DocumentEvent</code> interface will be implemented
on the same object which implements the <code>Document</code> interface in an
implementation which supports the Event model.
</p>
</descr>
<method name="createEvent" id="Events-DocumentEvent-createEvent">
<descr>
<p></p>
</descr>
<parameters>
<param name="eventType" type="DOMString" attr="in">
<descr>
<p>The <code>eventType</code> parameter specifies the type of <code>Event</code> interface
to be created. If the <code>Event</code> interface specified is supported by the implementation
this method will return a new <code>Event</code> of the interface type requested. If the
<code>Event</code> is to be dispatched via the <code>dispatchEvent</code> method the
appropriate event init method must be called after creation in order to initialize
the <code>Event</code>'s values. As an example, a user wishing to synthesize some kind of
<code>UIEvent</code> would call <code>createEvent</code> with the parameter "UIEvents". The
<code>initUIEvent</code> method could then be called on the newly created <code>UIEvent</code>
to set the specific type of UIEvent to be dispatched and set its context information.</p>
<p>The <code>createEvent</code> method is used in creating <code>Event</code>s when it is either
inconvenient or unnecessary for the
user to create an <code>Event</code> themselves. In cases where the implementation provided
<code>Event</code> is insufficient, users may supply their own <code>Event</code>
implementations for use with the <code>dispatchEvent</code> method.</p>
</descr>
</param>
</parameters>
<returns type="Event">
<descr><p>The newly created <code>Event</code></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr><p>NOT_SUPPORTED_ERR: Raised if the implementation does not support
the type of <code>Event</code> interface requested</p>
</descr>
</exception>
</raises>
</method>
</interface>
+169
View File
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- Event interface -->
<interface name="Event" id="Events-Event" since="DOM Level 2">
<descr>
<p>The <code>Event</code> interface is used to provide contextual information about an event
to the handler processing the event. An object which implements the <code>Event</code> interface
is generally passed as the first parameter to an event handler. More specific
context information is passed to event handlers by deriving additional interfaces from
<code>Event</code> which contain information directly relating to the type of event
they accompany. These derived interfaces are also implemented by the object passed to the
event listener.
</p>
</descr>
<group id="Events-Event-eventPhaseType" name="PhaseType">
<descr><p>An integer indicating which phase of event flow is being processed.</p></descr>
<constant name="CAPTURING_PHASE" type="unsigned short" value="1">
<descr><p>The current event phase is the capturing phase.</p></descr>
</constant>
<constant name="AT_TARGET" type="unsigned short" value="2">
<descr><p>The event is currently being evaluated at the target <code>EventTarget</code>.</p></descr>
</constant>
<constant name="BUBBLING_PHASE" type="unsigned short" value="3">
<descr><p>The current event phase is the bubbling phase.</p></descr>
</constant>
</group>
<attribute type="DOMString" name="type" readonly="yes" id="Events-Event-type">
<descr>
<p>The name of the event (case-insensitive). The name must be an <termref def="dt-XML-name">XML
name</termref>.</p>
</descr>
</attribute>
<attribute type="EventTarget" name="target" readonly="yes" id="Events-Event-target">
<descr>
<p>Used to indicate the <code>EventTarget</code> to which the event
was originally dispatched.
</p>
</descr>
</attribute>
<attribute type="EventTarget" name="currentTarget" readonly="yes" id="Events-Event-currentTarget">
<descr>
<p>Used to indicate the <code>EventTarget</code> whose
<code>EventListeners</code> are currently being processed. This is particularly
useful during capturing and bubbling.
</p>
</descr>
</attribute>
<attribute type="unsigned short" name="eventPhase" readonly="yes" id="Events-Event-eventPhase">
<descr>
<p>Used to indicate which phase of event flow is currently
being evaluated.
</p>
</descr>
</attribute>
<attribute type="boolean" name="bubbles" readonly="yes" id="Events-Event-canBubble">
<descr>
<p>Used to indicate whether or not an event is a bubbling event.
If the event can bubble the value is true, else the value is false.
</p>
</descr>
</attribute>
<attribute type="boolean" name="cancelable" readonly="yes" id="Events-Event-canCancel">
<descr>
<p>Used to indicate whether or not an event can have its default
action prevented. If the default action can be prevented the value is true, else the value is false.
</p>
</descr>
</attribute>
<attribute type="DOMTimeStamp" name="timeStamp" readonly="yes" id="Events-Event-timeStamp">
<descr>
<p>
Used to specify the time (in milliseconds relative
to the epoch) at which the event was created. Due to the fact that some
systems may not provide this information the value of
<code>timeStamp</code> may be not available for all events. When not
available, a value of 0 will be returned. Examples of epoch time are
the time of the system start or 0:0:0 UTC 1st January 1970.
</p>
</descr>
</attribute>
<method name="stopPropagation" id="Events-Event-stopPropagation">
<descr>
<p>The <code>stopPropagation</code> method is used prevent further propagation of an event during
event flow. If this method is called by any <code>EventListener</code> the event will cease
propagating through the tree. The event will complete dispatch to all listeners on the current
<code>EventTarget</code> before event flow stops. This method may be used during any stage of
event flow.</p>
</descr>
<parameters>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="preventDefault" id="Events-Event-preventDefault">
<descr>
<p>If an event is cancelable, the <code>preventDefault</code> method is used
to signify that the event is to be canceled, meaning any default action normally
taken by the implementation as a result of the event will not occur. If, during any stage of event flow,
the <code>preventDefault</code> method is called the event is canceled.
Any default action associated with the event will not occur. Calling this method
for a non-cancelable event has no effect. Once <code>preventDefault</code> has been
called it will remain in effect throughout the remainder of the event's propagation. This
method may be used during any stage of event flow.
</p>
</descr>
<parameters>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="initEvent" id="Events-Event-initEvent">
<descr>
<p>The <code>initEvent</code> method is used to initialize the value of an <code>Event</code> created through
the <code>DocumentEvent</code> interface. This method may only be called before the <code>Event</code> has
been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that
phase if necessary. If called multiple times the final invocation takes precedence. If called from a
subclass of <code>Event</code> interface only the values specified in the <code>initEvent</code> method are
modified, all other attributes are left unchanged.</p>
</descr>
<parameters>
<param name="eventTypeArg" type="DOMString" attr="in">
<descr><p>Specifies the event type. This type may be any event type currently
defined in this specification or a new event type.. The string must
be an <termref def="dt-XML-name">XML name</termref>. </p>
<p>Any new event type must not begin with any upper, lower, or mixed case version
of the string "DOM". This prefix is reserved for future DOM event sets. It is also
strongly recommended that third parties adding their own events use their own prefix to avoid
confusion and lessen the probability of conflicts with other new events.</p>
</descr>
</param>
<param name="canBubbleArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event can bubble.</p>
</descr>
</param>
<param name="cancelableArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event's default
action can be prevented.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- Event interface -->
<interface name="EventCapturer" id="Events-EventCapturer"
since="DOM Level 2">
<descr>
<p>The <code>EventCapturer</code> interface is implemented by <code>Node</code>'s which are
designated as being able to capture events.
</p>
</descr>
<method name="captureEvent" id="Events-EventCapturer-captureEvent">
<descr>
<p>This method is used when a capturing <code>Node</code> wishes to begin
capturing a particular type of event.
</p>
</descr>
<parameters>
<param name="type" type="DOMString" attr="in">
<descr><p>The name of the event to be captured</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="releaseEvent" id="Events-EventCapturer-releaseEvent">
<descr>
<p>This method is used when a capturing <code>Node</code> wishes to cease
capturing a particular type of event.
</p>
</descr>
<parameters>
<param name="type" type="DOMString" attr="in">
<descr><p>The name of the event to be released</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="routeEvent" id="Events-EventCapturer-routeEvent">
<descr>
<p>This method is called during the handling of an event by a capturing <code>
Node</code> to continue the event's flow to additional event handlers, or if none
are present, to the event's target.
</p>
</descr>
<parameters>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- Need an exception for when method is called outside of an event listener -->
</raises>
</method>
</interface>
@@ -0,0 +1,34 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- EventException interface -->
<exception id="Events-EventException" name="EventException" since="DOM Level 2">
<descr>
<p>
Event operations may throw an <code>EventException</code> as specified in
their method descriptions.
</p>
</descr>
<component id="Events-EventException-code" name="code">
<typename>unsigned short</typename>
</component>
</exception>
<group id="Events-EventException-EventExceptionCode" name="EventExceptionCode" since="DOM Level 2">
<descr>
<p>
An integer indicating the type of error generated.
</p>
</descr>
<constant name="UNSPECIFIED_EVENT_TYPE_ERR" type="unsigned short" value="0">
<descr>
<p>
If the <code>Event</code>'s type was not specified by initializing the
event before the method was called. Specification of the Event's type
as <code>null</code> or an empty string will also trigger this
exception.
</p>
</descr>
</constant>
</group>
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- Event listener interface -->
<interface id="Events-EventListener" name="EventListener"
since="DOM Level 2">
<descr>
<p>
The <code>EventListener</code> interface is the primary method for
handling events. Users implement the <code>EventListener</code> interface
and register their listener on an <code>EventTarget</code> using the
<code>AddEventListener</code> method. The users should also remove their
<code>EventListener</code> from its <code>EventTarget</code> after they
have completed using the listener.
</p>
<p>
When a <code>Node</code> is copied using the <code>cloneNode</code> method
the <code>EventListener</code>s attached to the source <code>Node</code> are
not attached to the copied <code>Node</code>. If the user wishes the same
<code>EventListener</code>s to be added to the newly created copy the user must add them manually.
</p>
</descr>
<method name="handleEvent" id="Events-EventListener-handleEvent">
<descr>
<p>
This method is called whenever an event occurs of the type for which
the <code> EventListener</code> interface was registered.
</p>
</descr>
<parameters>
<param name="evt" type="Event" attr="in">
<descr>
<p>
The <code>Event</code> contains contextual information about the
event. It also contains the <code>stopPropagation</code> and
<code>preventDefault</code> methods which are used in determining the event's flow and default
action.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- Event target interface -->
<interface name="EventTarget" id="Events-EventTarget"
since="DOM Level 2">
<descr>
<p>
The <code>EventTarget</code> interface is implemented by all
<code>Nodes</code> in an implementation which supports the DOM Event
Model. Therefore, this interface can be obtained by using
binding-specific casting methods on an instance of the <code>Node</code>
interface. The interface allows registration and removal of
<code>EventListeners</code> on an <code>EventTarget</code> and dispatch
of events to that <code>EventTarget</code>.</p>
</descr>
<method name="addEventListener" id="Events-EventTarget-addEventListener">
<descr>
<p>This method allows the registration of event listeners on the event target.
If an <code>EventListener</code> is added to an <code>EventTarget</code> while it is
processing an event, it will not be triggered by the current actions but may be
triggered during a later stage of event flow, such as the bubbling phase.
</p>
<p>
If multiple identical <code>EventListener</code>s are registered on the same
<code>EventTarget</code> with the same parameters the duplicate instances are discarded.
They do not cause the <code>EventListener</code> to be called twice and since they are
discarded they do not need to be removed with the <code>removeEventListener</code> method.
</p>
</descr>
<parameters>
<param name="type" type="DOMString" attr="in">
<descr><p>The event type for which the user is registering</p></descr>
</param>
<param name="listener" type="EventListener" attr="in">
<descr><p>The <code>listener</code> parameter takes an interface implemented by
the user which contains the methods to be called when the event occurs.</p></descr>
</param>
<param name="useCapture" type="boolean" attr="in">
<descr><p>If true, <code>useCapture</code> indicates that the user wishes to initiate
capture. After initiating capture, all events of the specified type will be
dispatched to the registered <code>EventListener</code> before being dispatched to any
<code>EventTargets</code> beneath them in the tree. Events which are bubbling upward
through the tree will not trigger an <code>EventListener</code> designated to use
capture.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="removeEventListener" id="Events-EventTarget-removeEventListener">
<descr>
<p>This method allows the removal of event listeners from the event target. If an
<code>EventListener</code> is removed from an <code>EventTarget</code> while it is
processing an event, it will not be triggered by the current actions. <code>EventListener</code>s
can never be invoked after being removed.</p>
<p>Calling <code>removeEventListener</code> with arguments which do not identify any
currently registered <code>EventListener</code> on the <code>EventTarget</code>
has no effect.</p>
</descr>
<parameters>
<param name="type" type="DOMString" attr="in">
<descr><p>Specifies the event type of the <code>EventListener</code> being removed.
</p>
</descr>
</param>
<param name="listener" type="EventListener" attr="in">
<descr><p>The <code>EventListener</code> parameter indicates the <code>EventListener
</code> to be removed.
</p></descr>
</param>
<param name="useCapture" type="boolean" attr="in">
<descr><p>Specifies whether the <code>EventListener</code> being removed was registered as a
capturing listener or not. If a listener was registered twice, one with capture and one
without, each must be removed separately. Removal of a capturing listener does not
affect a non-capturing version of the same listener, and vice versa.
</p></descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="dispatchEvent" id="Events-EventTarget-dispatchEvent">
<descr>
<p>This method allows the dispatch of events into the implementations event model. Events
dispatched in this manner will have the same capturing and bubbling behavior as events
dispatched directly by the implementation. The target of the event is the <code>
EventTarget</code> on which <code>dispatchEvent</code> is called.
</p>
</descr>
<parameters>
<param name="evt" type="Event" attr="in">
<descr><p>Specifies the event type, behavior, and contextual information to be used
in processing the event.</p>
</descr>
</param>
</parameters>
<returns type="boolean">
<descr><p>The return value of <code>dispatchEvent</code> indicates whether any of
the listeners which handled the event called <code>preventDefault</code>. If
<code>preventDefault</code> was called the value is false, else the value is true.
</p></descr>
</returns>
<raises>
<exception name="EventException">
<descr><p>UNSPECIFIED_EVENT_TYPE_ERR: Raised if the
<code>Event</code>'s type was not specified by initializing the
event before <code>dispatchEvent</code> was called.
Specification of the <code>Event</code>'s type as
<code>null</code> or an empty string will also trigger this
exception.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- MouseEvent interface -->
<interface name="MouseEvent" inherits="UIEvent" id="Events-MouseEvent"
since="DOM Level 2">
<descr>
<p>The <code>MouseEvent</code> interface provides specific contextual
information associated with Mouse events.</p>
<p>The <code>detail</code> attribute inherited from <code>UIEvent</code>
indicates the number of times a mouse button has been pressed and
released over the same screen location during a user action. The
attribute value is 1 when the user begins this action and increments by 1
for each full sequence of pressing and releasing. If the user moves the
mouse between the mousedown and mouseup the value will be set to 0,
indicating that no click is occurring.</p>
<p>In the case of nested elements mouse events are always targeted at the
most deeply nested element. Ancestors of the targeted element may use
bubbling to obtain notification of mouse events which occur within its
descendent elements.</p>
</descr>
<attribute type="long" name="screenX" readonly="yes"
id="Events-MouseEvent-screenX">
<descr>
<p>The horizontal coordinate at which the
event occurred relative to the origin of the screen coordinate
system.</p>
</descr>
</attribute>
<attribute type="long" name="screenY" readonly="yes"
id="Events-MouseEvent-screenY">
<descr>
<p>The vertical coordinate at which the
event occurred relative to the origin of the screen coordinate
system.</p>
</descr>
</attribute>
<attribute type="long" name="clientX" readonly="yes"
id="Events-MouseEvent-clientX">
<descr>
<p>The horizontal coordinate at which the
event occurred relative to the DOM implementation's client area.</p>
</descr>
</attribute>
<attribute type="long" name="clientY" readonly="yes"
id="Events-MouseEvent-clientY">
<descr>
<p>The vertical coordinate at which the
event occurred relative to the DOM implementation's client area.</p>
</descr>
</attribute>
<attribute type="boolean" name="ctrlKey" readonly="yes"
id="Events-MouseEvent-ctrlKey">
<descr>
<p>Used to indicate whether the 'ctrl' key was depressed
during the firing of the event.</p>
</descr>
</attribute>
<attribute type="boolean" name="shiftKey" readonly="yes"
id="Events-MouseEvent-shiftKey">
<descr>
<p>Used to indicate whether the 'shift' key was depressed
during the firing of the event.</p>
</descr>
</attribute>
<attribute type="boolean" name="altKey" readonly="yes"
id="Events-MouseEvent-altKey">
<descr>
<p>Used to indicate whether the 'alt' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.</p>
</descr>
</attribute>
<attribute type="boolean" name="metaKey" readonly="yes"
id="Events-MouseEvent-metaKey">
<descr>
<p>Used to indicate whether the 'meta' key was depressed
during the firing of the event. On some platforms this key may map to
an alternative key name.</p>
</descr>
</attribute>
<attribute type="unsigned short" name="button" readonly="yes"
id="Events-MouseEvent-button">
<descr>
<p>During mouse events caused by the depression or release of a mouse
button, <code>button</code> is used to indicate which mouse button
changed state. The values for <code>button</code> range from zero to indicate
the left button of the mouse, one to indicate the middle button if present, and
two to indicate the right button. For mice configured for left handed use in which
the button actions are reversed the values are instead read from right to left.</p>
</descr>
</attribute>
<attribute type="EventTarget" name="relatedTarget" readonly="yes"
id="Events-MouseEvent-relatedTarget">
<descr>
<p>Used to identify a secondary <code>EventTarget</code> related
to a UI event. Currently this attribute is used with the mouseover event to indicate the
<code>EventTarget</code> which the pointing device exited and with the mouseout event to indicate the
<code>EventTarget</code> which the pointing device entered.</p>
</descr>
</attribute>
<method name="initMouseEvent" id="Events-Event-initMouseEvent">
<descr>
<p>The <code>initMouseEvent</code> method is used to initialize the value of a <code>MouseEvent</code> created through
the <code>DocumentEvent</code> interface. This method may only be called before the <code>MouseEvent</code> has
been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.</p>
</descr>
<parameters>
<param name="typeArg" type="DOMString" attr="in">
<descr><p>Specifies the event type.</p>
</descr>
</param>
<param name="canBubbleArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event can bubble.</p>
</descr>
</param>
<param name="cancelableArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event's default
action can be prevented.</p>
</descr>
</param>
<param name="viewArg" type="views::AbstractView" attr="in">
<descr><p>Specifies the <code>Event</code>'s
<code>AbstractView</code>.</p>
</descr>
</param>
<param name="detailArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s mouse click count.</p>
</descr>
</param>
<param name="screenXArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s screen x coordinate</p>
</descr>
</param>
<param name="screenYArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s screen y coordinate</p>
</descr>
</param>
<param name="clientXArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s client x coordinate</p>
</descr>
</param>
<param name="clientYArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s client y coordinate</p>
</descr>
</param>
<param name="ctrlKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not control key was depressed during
the <code>Event</code>.</p>
</descr>
</param>
<param name="altKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not alt key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="shiftKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not shift key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="metaKeyArg" type="boolean" attr="in">
<descr><p>Specifies whether or not meta key was depressed during the
<code>Event</code>.</p>
</descr>
</param>
<param name="buttonArg" type="unsigned short" attr="in">
<descr><p>Specifies the <code>Event</code>'s mouse button.</p>
</descr>
</param>
<param name="relatedTargetArg" type="EventTarget" attr="in">
<descr><p>Specifies the <code>Event</code>'s related <code>EventTarget</code>.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- MutationEvent interface -->
<interface name="MutationEvent" inherits="Event"
id="Events-MutationEvent" since="DOM Level 2">
<descr>
<p>The <code>MutationEvent</code> interface provides specific contextual
information associated with Mutation events.
</p>
</descr>
<group id="Events-MutationEvent-attrChangeType" name="attrChangeType">
<descr><p>An integer indicating in which way the <code>Attr</code> was changed.</p></descr>
<constant name="MODIFICATION" type="unsigned short" value="1">
<descr><p>The <code>Attr</code> was modified in place.</p></descr>
</constant>
<constant name="ADDITION" type="unsigned short" value="2">
<descr><p>The <code>Attr</code> was just added.</p></descr>
</constant>
<constant name="REMOVAL" type="unsigned short" value="3">
<descr><p>The <code>Attr</code> was just removed.</p></descr>
</constant>
</group>
<attribute type="Node" name="relatedNode" readonly="yes"
id="Events-MutationEvent-relatedNode">
<descr>
<p>
<code>relatedNode</code> is used to identify a secondary node related to a mutation event.
For example, if a mutation event is dispatched to a node indicating that its parent
has changed, the <code>relatedNode</code> is the changed parent. If an event is instead
dispatched to a subtree indicating a node was changed within it, the <code>relatedNode</code>
is the changed node. In the case of the DOMAttrModified event it indicates the <code>Attr</code>
node which was modified, added, or removed.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="prevValue" readonly="yes"
id="Events-MutationEvent-prevValue">
<descr>
<p>
<code>prevValue</code> indicates the previous value of the <code>Attr</code> node in
DOMAttrModified events, and of the <code>CharacterData</code> node in DOMCharDataModified events.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="newValue" readonly="yes"
id="Events-MutationEvent-newValue">
<descr>
<p>
<code>newValue</code> indicates the new value of the <code>Attr</code> node in DOMAttrModified
events, and of the <code>CharacterData</code> node in DOMCharDataModified events.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="attrName" readonly="yes"
id="Events-MutationEvent-attrName">
<descr>
<p>
<code>attrName</code> indicates the name of the changed <code>Attr</code> node in a
DOMAttrModified event.
</p>
</descr>
</attribute>
<attribute type="unsigned short" name="attrChange" readonly="yes"
id="Events-MutationEvent-attrChange">
<descr>
<p>
<code>attrChange</code> indicates the type of change which triggered the DOMAttrModified event.
The values can be <code>MODIFICATION</code>, <code>ADDITION</code>, or <code>REMOVAL</code>.
</p>
</descr>
</attribute>
<method name="initMutationEvent" id="Events-Event-initMutationEvent">
<descr>
<p>The <code>initMutationEvent</code> method is used to initialize the value of a <code>MutationEvent</code> created through
the <code>DocumentEvent</code> interface. This method may only be called before the <code>MutationEvent</code> has
been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.</p>
</descr>
<parameters>
<param name="typeArg" type="DOMString" attr="in">
<descr><p>Specifies the event type.</p>
</descr>
</param>
<param name="canBubbleArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event can bubble.</p>
</descr>
</param>
<param name="cancelableArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event's default
action can be prevented.</p>
</descr>
</param>
<param name="relatedNodeArg" type="Node" attr="in">
<descr><p>Specifies the <code>Event</code>'s related Node.</p>
</descr>
</param>
<param name="prevValueArg" type="DOMString" attr="in">
<descr><p>Specifies the <code>Event</code>'s <code>prevValue</code> attribute. This value may be null.</p>
</descr>
</param>
<param name="newValueArg" type="DOMString" attr="in">
<descr><p>Specifies the <code>Event</code>'s <code>newValue</code> attribute. This value may be null.</p>
</descr>
</param>
<param name="attrNameArg" type="DOMString" attr="in">
<descr><p>Specifies the <code>Event</code>'s <code>attrName</code> attribute. This value may be null.</p>
</descr>
</param>
<param name="attrChangeArg" type="unsigned short" attr="in">
<descr><p>Specifies the <code>Event</code>'s <code>attrChange</code> attribute</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<!-- UIEvent interface -->
<interface name="UIEvent" inherits="Event" id="Events-UIEvent"
since="DOM Level 2">
<descr>
<p>The <code>UIEvent</code> interface provides specific contextual
information associated with User Interface events.</p>
</descr>
<attribute type="views::AbstractView" name="view" readonly="yes"
id="Events-UIEvent-view">
<descr>
<p>The <code>view</code> attribute identifies the
<code>AbstractView</code> from which the event was generated.</p>
</descr>
</attribute>
<attribute id="Events-UIEvent-detail" name="detail" type="long" readonly="yes">
<descr><p>Specifies some detail information about the <code>Event</code>,
depending on the type of event.</p>
</descr>
</attribute>
<method name="initUIEvent" id="Events-Event-initUIEvent">
<descr>
<p>The <code>initUIEvent</code> method is used to initialize the value of a <code>UIEvent</code> created through
the <code>DocumentEvent</code> interface. This method may only be called before the <code>UIEvent</code> has
been dispatched via the <code>dispatchEvent</code> method, though it may be called multiple times during that
phase if necessary. If called multiple times, the final invocation takes precedence.</p>
</descr>
<parameters>
<param name="typeArg" type="DOMString" attr="in">
<descr><p>Specifies the event type.</p>
</descr>
</param>
<param name="canBubbleArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event can bubble.</p>
</descr>
</param>
<param name="cancelableArg" type="boolean" attr="in">
<descr><p>Specifies whether or not the event's default
action can be prevented.</p>
</descr>
</param>
<param name="viewArg" type="views::AbstractView" attr="in">
<descr><p>Specifies the <code>Event</code>'s
<code>AbstractView</code>.</p>
</descr>
</param>
<param name="detailArg" type="long" attr="in">
<descr><p>Specifies the <code>Event</code>'s detail.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
+165
View File
@@ -0,0 +1,165 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Events">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Events Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor"> <name>Tom Pixley</name>
<affiliation>Netscape Communications Corp.</affiliation> </author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Events, a
platform- and language-neutral interface that gives to programs and scripts a
generic event system. The Document Object Model Level 2 Events builds on the
Document Object Model Level 2 Core <bibref ref='DOMCore'/> and on Document
Object Model Level 2 Views <bibref ref='DOMViews'/>.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
</front>
<body>
&events;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for
the Level 2 Document Object Model Events definitions.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<!--
******************************************************
| Events OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL Events events dom.w3c.org dom views?>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java <bibref ref='Java'/> bindings
for the Level 2 Document Object Model Events.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<!--
******************************************************
| Events JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA Events org.w3c.dom events?>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Events
definitions.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<!--
******************************************************
| Events ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA Events?>
<p>
The following example will add an ECMAScript based EventListener to the
Node 'exampleNode':
</p>
<eg role='code'>
// Given the Node 'exampleNode'
// Define the EventListener function
function clickHandler(evt)
{
// Function contents
}
// The following line will add a non-capturing 'click' listener
// to 'exampleNode'.
exampleNode.addEventListener("click", clickHandler, false);
</eg>
</div1>
&contributors;
&glossary;
&references;
&index;
</back>
</spec>
+825
View File
@@ -0,0 +1,825 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF EVENTS *
*************************************************************************
-->
<div1 id="Events">
<head>Document Object Model Events</head>
<orglist role="editors">
<member>
<name>Tom Pixley</name>
<affiliation>Netscape Communications Corp.</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="Events-overview">
<head>Overview of the DOM Level 2 Event Model</head>
<p>The DOM Level 2 Event Model is designed with two main goals. The first goal is the design
of a generic event system which allows registration of event handlers, describes event flow
through a tree structure, and provides basic contextual information for each event.
Additionally, the specification will provide standard modules of events for user
interface control and document mutation notifications, including defined contextual information
for each of these event modules.</p>
<p>The second goal of the event model is to provide a common subset of the current event
systems used in <termref def='dt-DOM-Level-0'>DOM
Level 0</termref> browsers. This is
intended to foster interoperability of existing scripts and content. It is not expected that
this goal will be met with full backwards compatibility. However, the specification attempts
to achieve this when possible.</p>
<p>The following sections of the Event Model specification define both the specification
for the DOM Event Model and a number of conformant event modules designed for use within the
model. The Event Model consists of the two sections on event propagation and event listener
registration and the Event interface.</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "Events" and "2.0" (respectively) to determine whether or not the
event module is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined in
the DOM Level 2 Core specification <bibref ref="DOMCore"/>. Please, refer
to additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<p>
Each event module describes its own feature string in the event module
listing.
</p>
<div3 id="Events-overview-terminology">
<head>Terminology</head>
<glist>
<gitem>
<label>UI events</label>
<def><p>User interface events. These events are generated
by user interaction through an external device (mouse, keyboard, etc.)</p></def>
</gitem>
<gitem>
<label>UI Logical events</label>
<def><p>Device independent user interface events such as focus change
messages or element triggering notifications.</p></def>
</gitem>
<gitem>
<label>Mutation events</label>
<def><p>Events caused by any action which modifies the structure of the
document.</p></def>
</gitem>
<gitem>
<label>Capturing</label>
<def><p>The process by which an event can be handled by one of the event's
target's <termref def="dt-ancestor">ancestors</termref> before being handled by the event's target.</p></def>
</gitem>
<gitem>
<label>Bubbling</label>
<def><p>The process by which an event propagates upward through its
<termref def="dt-ancestor">ancestors</termref>
after being handled by the event's target.</p></def>
</gitem>
<gitem>
<label>Cancelable</label>
<def><p>A designation for events which indicates that upon handling the event
the client may choose to prevent the DOM implementation from processing any default
action associated with the event.</p></def>
</gitem>
</glist>
</div3>
</div2>
<div2 id="Events-flow">
<head>Description of event flow</head>
<p>Event flow is the process through which the an event originates from the DOM implementation
and is passed into the Document Object Model. The methods of event capture and event
bubbling, along with various event listener registration techniques, allow the event
to then be handled in a number of ways. It can be handled locally at the <code>
EventTarget</code> level or centrally from an <code>EventTarget</code> higher in the document tree.</p>
<div3 id="Events-flow-basic">
<head>Basic event flow</head>
<p>Each event has an <code>EventTarget</code> toward which the event is directed by the DOM implementation. This
<code>EventTarget</code> is specified in the <code>Event</code>'s <code>target</code> attribute. When
the event reaches the target, any event
listeners registered on the <code>EventTarget</code> are triggered. Although all <code>EventListeners</code>
on the <code>EventTarget</code> are guaranteed to be triggered by any event which is received by that <code>
EventTarget</code>, no specification is made as to the order
in which they will receive the event with regards to the other <code>EventListeners</code> on the
<code>EventTarget</code>. If neither event
capture or event bubbling are in use for that particular event,
the event flow process will complete after all listeners have been triggered. If event capture
or event bubbling is in use, the event flow will be modified as described in the sections below.</p>
<p>Any exceptions thrown inside an <code>EventListener</code> will not stop propagation of the
event. It will continue processing any additional <code>EventListener</code> in the described manner.</p>
<p>It is expected that actions taken by <code>EventListener</code>s may cause additional events to
fire. Additional events should be handled in a synchronous manner and may cause reentrancy into
the event model.</p>
</div3>
<div3 id="Events-flow-capture">
<head>Event capture</head>
<p>Event capture is the process by which an EventListener registered on
an <termref def="dt-ancestor">ancestor</termref>
of the event's target can intercept events of a given type before they
are received by the event's target. Capture operates from
the top of the tree, generally the <code>Document</code>, downward, making it the symmetrical opposite of bubbling
which is described below. The chain of <code>EventTarget</code>s from the top of the tree
to the event's target is determined before the initial dispatch of the event. If modifications
occur to the tree during event processing, event flow will proceed based on the initial state of the tree.</p>
<p>An <code>EventListener</code> being registered on an <code>EventTarget</code>
may choose to have that <code>EventListener</code> capture events by
specifying the <code>useCapture</code> parameter of the <code>addEventListener</code>
method to be <code>true</code>. Thereafter, when an event of the given type is
dispatched toward a <termref def="dt-descendant">descendant</termref> of the capturing object, the event
will trigger any capturing event listeners of the appropriate type
which exist in the direct line between the top of the document and the
event's target. This downward propagation continues until the event's target is
reached. A capturing <code>EventListener</code> will not be triggered by events
dispatched directly to the <code>EventTarget</code> upon which it is registered.</p>
<p>If the capturing <code>EventListener</code> wishes to prevent further
processing of the event from occurring it may call the <code>stopProgagation</code> method of
the <code>Event</code> interface. This will prevent further dispatch of the event, although additional <code>EventListeners</code> registered at
the same hierarchy level will still receive the event. Once an event's
<code>stopPropagation</code> method has been called, further calls to that method have
no additional effect. If no additional capturers exist and <code>stopPropagation</code>
has not been called,
the event triggers the appropriate <code>EventListeners</code> on the target
itself.</p>
<p>Although event capture is similar to the delegation based event
model in which all interested parties register their listeners directly on the target
about which they wish to receive notifications, it is different in two important respects.
First, event capture only allows interception of events which are
targeted at <termref def="dt-descendant">descendants</termref>
of the capturing <code>EventTarget</code>. It does not allow interception of events
targeted to the capturer's <termref
def="dt-ancestor">ancestors</termref>, its <termref def="dt-sibling">siblings</termref>, or its
sibling's <termref def="dt-descendant">descendants</termref>. Secondly, event capture is not specified for
a single <code>EventTarget</code>, it is specified for a specific type of event.
Once specified, event capture intercepts all events
of the specified type targeted toward any of the capturer's <termref def="dt-descendant">descendants</termref>.</p>
</div3>
<div3 id="Events-flow-bubbling">
<head>Event bubbling</head>
<p>Events which are designated as bubbling will initially proceed with the
same event flow as non-bubbling events. The event is dispatched to its target
<code>EventTarget</code> and any event listeners found there are triggered. Bubbling
events will then trigger any additional event listeners found by following the
<code>EventTarget</code>'s parent chain upward, checking for any event listeners
registered on each successive <code>EventTarget</code>. This upward propagation will continue
up to and including the <code>Document</code>. <code>EventListener</code>s registered as
capturers will not be triggered during this phase. The chain of <code>EventTarget</code>s from the event
target to the top of the tree is determined before the initial dispatch of the event. If modifications
occur to the tree during event processing, event flow will proceed based on the initial state of the tree.</p>
<p>Any event handler may choose to prevent further event propagation
by calling the <code>stopPropagation</code> method of the <code>Event</code> interface. If
any <code>EventListener</code> calls this method, all additional <code>EventListeners</code>
on the current <code>EventTarget</code> will be triggered but bubbling
will cease at that level. Only one call to <code>stopPropagation</code> is required to
prevent further bubbling.</p>
</div3>
<div3 id="Events-flow-cancelation">
<head>Event cancelation</head>
<p>Some events are specified as cancelable. For these events, the
DOM implementation generally has a default action associated with the
event. An example of this is a hyperlink in a web browser. When the user clicks on the
hyperlink the default action is generally to active that hyperlink.
Before processing these events, the implementation must check for
event listeners registered to receive the event and dispatch the event to
those listeners. These listeners then have the option of canceling the
implementation's default action or allowing the default action to proceed. In the
case of the hyperlink in the browser, canceling the action would have the result
of not activating the hyperlink.</p>
<p>Cancelation is accomplished by calling the <code>Event</code>'s <code>
preventDefault</code> method. If one or more <code>EventListeners</code> call <code>
preventDefault</code> during any phase of event flow the default action will
be canceled.</p>
<p>Different implementations will specify their own default actions, if any, associated
with each event. The DOM does not attempt to specify these actions.</p>
</div3>
</div2>
<div2 id="Events-registration">
<head>Event listener registration</head>
<div3 id="Events-Registration-interfaces">
<head>Event registration interfaces</head>
<definitions>
&events-eventtarget;
&events-eventlistener;
</definitions>
</div3>
<div3 id="Events-registration-html40">
<head>Interaction with HTML 4.0 event listeners</head>
<p>In HTML 4.0, event listeners were specified as attributes of an element. As such,
registration of a second event listener of the same type would replace the
first listener. The DOM Event Model allows registration of multiple event listeners on
a single <code>EventTarget</code>. To achieve this, event listeners are no longer stored as attribute
values.</p>
<p>In order to achieve compatibility with HTML 4.0, implementors may view the setting of
attributes which represent event handlers as the creation and registration of an <code>
EventListener</code> on the <code>EventTarget</code>. The value of <code>useCapture</code>
defaults to <code>false</code>. This <code>EventListener</code> behaves in
the same manner as any other <code>EventListeners</code> which may be registered on the
<code>EventTarget</code>. If the attribute representing the event listener is changed, this may be
viewed as the removal of the previously registered <code>EventListener</code> and the
registration of a new one. No technique is provided to allow HTML 4.0 event listeners
access to the context information defined for each event.</p>
</div3>
</div2>
<div2 id="Events-interface">
<head>Event interface</head>
<definitions>
&events-event;
&events-eventexception;
</definitions>
</div2>
<div2 id="Events-document">
<head>DocumentEvent interface</head>
<definitions>
&events-documentevent;
</definitions>
</div2>
<div2 id="Events-eventgroupings">
<head>Event module definitions</head>
<p>The DOM Level 2 Event Model allows a DOM implementation to support multiple modules of events. The
model has been designed to allow addition of new event modules as is required. The DOM will
not attempt to define all possible events. For purposes of interoperability, the DOM will
define a module of user interface events including lower level device dependent events, a module
of UI logical events, and a module of document mutation events.
Any new event types defined by third parties must not begin with any upper, lower, or mixed
case version of the string "DOM". This prefix is reserved for future DOM event modules. It is also
strongly recommended that third parties adding their own events use their own prefix to avoid
confusion and lessen the probability of conflicts with other new events.
</p>
<div3 id="Events-eventgroupings-uievents">
<head>User Interface event types</head>
<p>The User Interface event module is composed of events listed in HTML 4.0 and additional
events which are supported in <termref def='dt-DOM-Level-0'>DOM
Level 0</termref> browsers.</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "UIEvents" and "2.0" (respectively) to determine whether or not
the User Interface event module is supported by the implementation. In
order to fully support this module, an implementation must also support
the "Events" feature defined in this specification and the
"Views" feature defined in the DOM Level 2 Views specification <bibref
ref="DOMViews"/>. Please, refer to additional information about
<xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<note>
<p>To create an instance of the <code>UIEvent</code> interface, use the
feature string "UIEvents" as the value of the input parameter used with
the <code>createEvent</code> method of the <code>DocumentEvent</code>
interface.</p>
</note>
<definitions>
&events-uievent;
</definitions>
<p>The different types of such events that can occur are:
<glist>
<gitem>
<label>DOMFocusIn</label>
<def>
<p>The DOMFocusIn event occurs when an <code>EventTarget</code> receives focus, for
instance via a pointing device being moved onto an element or
by tabbing navigation to the element. Unlike the HTML event
focus, DOMFocusIn can be applied to any focusable <code>EventTarget</code>, not just FORM
controls.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMFocusOut</label>
<def>
<p>The DOMFocusOut event occurs when a <code>EventTarget</code> loses focus, for
instance via a pointing device being moved out of an element or
by tabbing navigation out of the element. Unlike the HTML event
blur, DOMFocusOut can be applied to any focusable <code>EventTarget</code>, not just FORM
controls.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMActivate</label>
<def>
<p>The activate event occurs when an element is activated, for
instance, thru a mouse click or a keypress. A numerical
argument is provided to give an indication of the type of
activation that occurs: 1 for a simple activation (e.g. a
simple click or Enter), 2 for hyperactivation (for instance a
double click or Shift Enter).</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: detail (the numerical value)</p></item>
</ulist>
</def>
</gitem>
</glist>
</p>
</div3>
<div3 id="Events-eventgroupings-mouseevents">
<head>Mouse event types</head>
<p>The Mouse event module is composed of events listed in HTML 4.0 and additional
events which are supported in <termref def='dt-DOM-Level-0'>DOM
Level 0</termref> browsers. This event module is specifically designed for use with mouse
input devices.</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "MouseEvents" and "2.0" (respectively) to determine whether or not
the Mouse event module is supported by the implementation. In order to
fully support this module, an implementation must also support the
"UIEvents" feature defined in this specification. Please, refer to
additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<note>
<p>To create an instance of the <code>MouseEvent</code> interface, use the
feature string "MouseEvents" as the value of the input parameter used with
the <code>createEvent</code> method of the <code>DocumentEvent</code>
interface.</p>
</note>
<definitions>
&events-mouseevent;
</definitions>
<p>The different types of Mouse events that can occur are:
<glist>
<gitem>
<label>click</label>
<def>
<p>The click event occurs when the pointing device button is clicked over
an element. A click is defined as a mousedown and mouseup over the same screen
location. The sequence of these events is:
<eg>
mousedown
mouseup
click
</eg>
If multiple clicks occur at the same screen location, the sequence repeats
with the <code>detail</code> attribute incrementing with each repetition.
This event is valid for most elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>mousedown</label>
<def>
<p>The mousedown event occurs when the pointing device button is pressed over
an element. This event is valid for most elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>mouseup</label>
<def>
<p>The mouseup event occurs when the pointing device button is released over
an element. This event is valid for most elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>mouseover</label>
<def>
<p>The mouseover event occurs when the pointing device is moved onto an element.
This event is valid for most elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget
indicates the <code>EventTarget</code> the pointing device is exiting.</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>mousemove</label>
<def>
<p>The mousemove event occurs when the pointing device is moved while it is
over an element. This event is valid for most elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>mouseout</label>
<def>
<p>The mouseout event occurs when the pointing device is moved away from an
element. This event is valid for most elements..</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, relatedTarget
indicates the <code>EventTarget</code> the pointing device is entering.</p></item>
</ulist>
</def>
</gitem>
</glist>
</p>
</div3>
<div3 id="Events-eventgroupings-keyevents">
<head>Key events</head>
<p>The DOM Level 2 Event specification does not provide a key event module. An event module designed
for use with keyboard
input devices will be included in a later version of the DOM specification.</p>
</div3>
<div3 id="Events-eventgroupings-mutationevents">
<head>Mutation event types</head>
<p>The mutation event module is designed to allow notification of any changes
to the structure of a document, including attr and text modifications. It may
be noted that none of the mutation events listed are designated as cancelable.
This stems from the fact that it is very difficult to make
use of existing DOM interfaces which cause document modifications if any change
to the document might or might not take place due to cancelation of the related
event. Although this is still a desired capability, it was decided that it would
be better left until the addition of transactions into the DOM.</p>
<p>Many single modifications of the tree can cause multiple mutation events to be fired.
Rather than attempt to specify the ordering of mutation events due to every
possible modification of the tree, the ordering of these events is left to the implementation.</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "MutationEvents" and "2.0" (respectively) to determine whether or not
the Mutation event module is supported by the implementation. In order to
fully support this module, an implementation must also support the
"Events" feature defined in this specification. Please, refer to
additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<note>
<p>To create an instance of the <code>MutationEvent</code> interface, use the
feature string "MutationEvents" as the value of the input parameter used with
the <code>createEvent</code> method of the <code>DocumentEvent</code>
interface.</p>
</note>
<definitions>
&events-mutationevent;
</definitions>
<p>The different types of Mutation events that can occur are:
<glist>
<gitem>
<label>DOMSubtreeModified</label>
<def>
<p> This is a general event for notification of all changes to the
document. It can be used instead of the more specific events listed
below. It may be fired after a single modification to the document or, at
the implementation's discretion, after multiple changes have occurred. The
latter use should generally be used to accomodate multiple changes which occur
either simultaneously or in rapid succession. The target of this event
is the lowest common parent of the changes which have taken place. This
event is dispatched after any other events caused by the mutation have
fired.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMNodeInserted</label>
<def>
<p>Fired when a node has been added as a <termref def='dt-child'>child</termref> of another node. This
event is dispatched after the insertion has taken place. The target of
this event is the node being inserted.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: relatedNode holds the parent node</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMNodeRemoved</label>
<def>
<p>Fired when a node is being removed from its parent node. This event is
dispatched before the node is removed from the tree. The target of this
event is the node being removed.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: relatedNode holds the parent node</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMNodeRemovedFromDocument</label>
<def>
<p>Fired when a node is being removed from a document, either through
direct removal of the Node or removal of a subtree in which it is
contained. This event is dispatched before the removal takes place.
The target of this event is the Node being removed. If the Node is
being directly removed the DOMNodeRemoved event will fire before the
DOMNodeRemovedFromDocument event.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMNodeInsertedIntoDocument</label>
<def>
<p>Fired when a node is being inserted into a document, either through
direct insertion of the Node or insertion of a subtree in which it is
contained. This event is dispatched after the insertion has taken
place. The target of this event is the node being inserted. If the
Node is being directly inserted the DOMNodeInserted event will fire before
the DOMNodeInsertedIntoDocument event.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMAttrModified</label>
<def>
<p>Fired after an <code>Attr</code> has been modified on a node. The target of this
event is the <code>Node</code> whose <code>Attr</code> changed. The value of attrChange indicates
whether the <code>Attr</code> was modified, added, or removed. The
value of relatedNode indicates the <code>Attr</code> node whose value has been affected. It is expected
that string based replacement of an <code>Attr</code> value will be viewed as a modification of the <code>Attr</code>
since its identity does not change. Subsequently replacement of the <code>Attr</code> node with a different
<code>Attr</code> node is viewed as the removal of the first <code>Attr</code> node and the addition of the second.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: attrName, attrChange, prevValue, newValue, relatedNode</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>DOMCharacterDataModified</label>
<def>
<p>Fired after CharacterData within a node has been modified but the node
itself has not been inserted or deleted. This event is also triggered by
modifications to PI elements. The target of this event is the
CharacterData node.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: prevValue, newValue</p></item>
</ulist>
</def>
</gitem>
</glist>
</p>
</div3>
<div3 id="Events-eventgroupings-htmlevents">
<head>HTML event types</head>
<p>The HTML event module is composed of events listed in HTML 4.0 and additional
events which are supported in <termref def='dt-DOM-Level-0'>DOM
Level 0</termref> browsers.</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "HTMLEvents" and "2.0" (respectively) to determine whether or not
the HTML event module is supported by the implementation. In order to
fully support this module, an implementation must also support the
"Events" feature defined in this specification. Please, refer to
additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<note>
<p>To create an instance of the <code>Event</code> interface for
the HTML event module, use the
feature string "HTMLEvents" as the value of the input parameter used with
the <code>createEvent</code> method of the <code>DocumentEvent</code>
interface.</p>
</note>
<p>The HTML events use the base DOM Event interface to pass contextual information.</p>
<p>The different types of such events that can occur are:
<glist>
<gitem>
<label>load</label>
<def>
<p>The load event occurs when the DOM implementation finishes loading all content within
a document, all frames within a FRAMESET, or an OBJECT element.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>unload</label>
<def><p>The unload event occurs when the DOM implementation removes a document from a window
or frame. This event is valid for BODY and FRAMESET elements.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>abort</label>
<def><p>The abort event occurs when page loading is stopped before an image has
been allowed to completely load. This event applies to OBJECT elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>error</label>
<def><p>The error event occurs when an image does not load properly or when an
error occurs during script execution. This event is valid for OBJECT
elements, BODY elements, and FRAMESET element.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>select</label>
<def><p>The select event occurs when a user selects some text in a text field.
This event is valid for INPUT and TEXTAREA elements.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>change</label>
<def><p>The change event occurs when a control loses the input focus and its value
has been modified since gaining focus. This event is valid for INPUT, SELECT, and TEXTAREA.
element.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>submit</label>
<def><p>The submit event occurs when a form is submitted. This event only applies to the
FORM element.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: Yes</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>reset</label>
<def><p>The reset event occurs when a form is reset. This event only applies to the FORM
element.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>focus</label>
<def><p>The focus event occurs when an element receives focus either via a pointing
device or by tabbing navigation. This event is valid for the following
elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>blur</label>
<def><p>The blur event occurs when an element loses focus either via the pointing
device or by tabbing navigation. This event is valid for the following
elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.</p>
<ulist>
<item><p>Bubbles: No</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>resize</label>
<def>
<p>The resize event occurs when a document view is resized.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
<gitem>
<label>scroll</label>
<def>
<p>The scroll event occurs when a document view is
scrolled.</p>
<ulist>
<item><p>Bubbles: Yes</p></item>
<item><p>Cancelable: No</p></item>
<item><p>Context Info: None</p></item>
</ulist>
</def>
</gitem>
</glist>
</p>
</div3>
</div2>
</div1>
<!--
*************************************************************************
* END OF EVENTS *
*************************************************************************
-->
+471
View File
@@ -0,0 +1,471 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF DOM GLOSSARY *
*************************************************************************
-->
<div1 role="glossary" id="glossary">
<head>Glossary</head>
<orglist role="editors">
<member>
<name>Arnaud Le Hors</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Lauren Wood</name>
<affiliation>SoftQuad Software Inc.</affiliation>
</member>
<member>
<name>Robert S. Sutor</name>
<affiliation>IBM (for DOM Level 1)</affiliation>
</member>
</orglist>
<p>Several of the following term definitions have been borrowed or modified
from similar definitions in other W3C or standards documents. See the links
within the definitions for more information.</p>
<glist><!-- ................................................................ -->
<gitem>
<label id="dt-16-bit-unit">16-bit unit</label>
<def>
<p>The base unit of a <code>DOMString</code>. This indicates that indexing on a <code>DOMString</code> occurs in units of 16 bits. This must not be misunderstood to mean that
a <code>DOMString</code> can store arbitrary 16-bit units. A <code>DOMString</code> is a character string encoded in UTF-16; this means that the
restrictions of UTF-16 as well as the other relevant restrictions on character
strings must be maintained. A single character, for example in the form of a
numeric character reference, may correspond to one or two 16-bit units.</p>
<p>For more information, see <bibref ref="Unicode"/> and
<bibref ref="ISO10646"/>.</p>
</def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-ancestor">ancestor</label>
<def>
<p>An <term>ancestor</term> node of any node A is any node above A in a
tree model of a document, where "above" means "toward the root." </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-API">API</label>
<def>
<p>An <term>API</term> is an application programming interface, a set
of functions or <term>methods</term> used to access some
functionality.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-child">child</label>
<def>
<p>A <term>child</term> is an immediate <term>descendant</term> node of
a node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-application">client application</label>
<def>
<p>A [client] application is any software that uses the Document Object
Model programming interfaces provided by the hosting implementation to
accomplish useful work. Some examples of client applications are scripts within
an HTML or XML document.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-COM">COM</label>
<def>
<p><term>COM</term> is Microsoft's Component Object Model
<bibref ref="COM"/>, a technology for building applications from binary
software components.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-content-model">content model</label>
<def>
<p>The <term>content model</term> is a simple grammar governing the
allowed types of the <term>child</term> elements and the order in which they
appear. See <xspecref href="&xml-spec;#sec-element-content">Element
Content</xspecref> in XML <bibref ref="XML"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-context">context</label>
<def>
<p>A <term>context</term> specifies an access pattern (or path): a set
of interfaces which give you a way to interact with a model. For example,
imagine a model with different colored arcs connecting data nodes. A context
might be a sheet of colored acetate that is placed over the model allowing you
a partial view of the total information in the model.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-convenience">convenience</label>
<def>
<p>A <term>convenience method</term> is an operation on an object that
could be accomplished by a program consisting of more basic operations on the
object. Convenience <term>methods</term> are usually provided to make the API
easier and simpler to use or to allow specific programs to create more
optimized implementations for common operations. A similar definition holds for
a <term>convenience property</term>. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-cooked">cooked model</label>
<def>
<p>A model for a document that represents the document after it has
been manipulated in some way. For example, any combination of any of the
following transformations would create a cooked model:
<olist>
<item>
<p>Expansion of internal text entities.</p>
</item>
<item>
<p>Expansion of external entities.</p>
</item>
<item>
<p>Model augmentation with style-specified generated text.</p>
</item>
<item>
<p>Execution of style-specified reordering.</p>
</item>
<item>
<p>Execution of scripts.</p>
</item>
</olist> A browser might only be able to provide access to a cooked
model, while an editor might provide access to a cooked or the initial
structure model (also known as the <term>uncooked model</term>) for a document.
</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-CORBA">CORBA</label>
<def>
<p><term>CORBA</term> is the <term>Common Object Request Broker
Architecture</term> from the
<loc href="&omg;">OMG</loc> <bibref ref="CORBA"/>. This architecture
is a collection of objects and libraries that allow the creation of
applications containing objects that make and receive requests and responses in
a distributed environment.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-cursor">cursor</label>
<def>
<p>A <term>cursor</term> is an object representation of a node. It may
possess information about context and the path traversed to reach the
node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-datamodel">data model</label>
<def>
<p>A <term>data model</term> is a collection of descriptions of data
structures and their contained fields, together with the operations or
functions that manipulate them.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-deepest">deepest</label>
<def>
<p>The <term>deepest</term> element is that element which is furthest
from the root or document element in a tree model of the document.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-documentorder">document order</label>
<def>
<p>The term <term>document order</term> has the same meaning as depth
first, pre-order traversal, which is equivalent to the order in
which the start tags occur in the text representation of the document.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-deprecation">deprecation</label>
<def>
<p>When new releases of specifications are released, some older
features may be marked as being <term>deprecated</term>. This means that new
work should not use the features and that although they are supported in the
current release, they may not be supported or available in future
releases.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-descendant">descendant</label>
<def>
<p>A <term>descendant</term> node of any node A is any node below A in
a tree model of a document, where "above" means "toward the root."</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-DOM-Level-0">DOM Level 0</label>
<def>
<p>The term "<term>DOM Level 0</term>" refers to a mix (not formally
specified) of HTML document functionalities offered by Netscape Navigator
version 3.0 and Microsoft Internet Explorer version 3.0. In some cases,
attributes or <term>methods</term> have been included for reasons of backward
compatibility with "DOM Level 0".</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-ECMAScript">ECMAScript</label>
<def>
<p>The programming language defined by the ECMA-262 standard
<bibref ref="ECMAScript"/>. As stated in the standard, the originating
technology for ECMAScript was JavaScript <bibref ref="JavaScript"/>. Note that
in the ECMAScript Language binding, the word &quot;property&quot; is used in the same
sense as the IDL term &quot;attribute.&quot;</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-element">element</label>
<def>
<p>Each document contains one or more elements, the boundaries of which
are either delimited by start-tags and end-tags, or, for empty elements by an
empty-element tag. Each element has a type, identified by name, and may have a
set of attributes. Each attribute has a name and a value. See
<xspecref href="&xml-spec;#sec-logical-struct">Logical Structures</xspecref> in
XML <bibref ref="XML"/>. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-event-propagation">event propagation, also known as event
bubbling</label>
<def>
<p>This is the idea that an event can affect one object and a set of
related objects. Any of the potentially affected objects can block the event or
substitute a different one (upward event propagation). The event is broadcast
from the node at which it originates to every <term>parent</term>
node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-equivalence">equivalence</label>
<def>
<p>Two nodes are <term>equivalent</term> if they have the same node
type and same node name. Also, if the nodes contain data, that must be the
same. Finally, if the nodes have attributes the collection of attribute names
must be the same and the attributes corresponding by name must be equivalent as
nodes.</p>
<p>Two nodes are <term>deeply equivalent</term> if they are
<term>equivalent</term>, their <term>child</term> node lists are equivalent <code>NodeList</code> objects, and their attributes are deeply equivalent.</p>
<p>Two <code>NodeList</code> objects are <term>equivalent</term> if they have the same length, and
the nodes corresponding by index are deeply equivalent. </p>
<p>Two <code>NamedNodeMap</code> objects are <term>equivalent</term> if they have the same length, they
have same collection of names, and the nodes corresponding by name in the maps
are deeply equivalent. </p>
<p>Two <code>DocumentType</code> nodes are <term>equivalent</term> if they are equivalent as nodes, have
the same names, and have equivalent entities and attributes <code>NamedNodeMap</code> objects.</p>
</def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-infoitem">information item</label>
<def>
<p>An information item is an abstract representation of some component
of an XML document. See the <bibref ref="InfoSet"/> for details. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-implementation">hosting implementation</label>
<def>
<p>A [hosting] implementation is a software module that provides an
implementation of the DOM interfaces so that a client application can use them.
Some examples of hosting implementations are browsers, editors and document
repositories.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-HTML">HTML</label>
<def>
<p>The HyperText Markup Language (<term>HTML</term>) is a simple markup
language used to create hypertext documents that are portable from one platform
to another. HTML documents are SGML documents with generic semantics that are
appropriate for representing information from a wide range of applications.
<bibref ref="HTML40"/></p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-IDL">IDL</label>
<def>
<p>An Interface Definition Language (<term>IDL</term>) is used to
define the interfaces for accessing and operating upon objects. Examples of
IDLs are the Object Management Group's IDL <bibref ref="CORBA"/>, Microsoft's
IDL <bibref ref="MSIDL"/>, and Sun's Java IDL <bibref
ref="JavaIDL"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-implementor">implementor</label>
<def>
<p>Companies, organizations, and individuals that claim to support the
Document Object Model as an API for their products.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-inheritance">inheritance</label>
<def>
<p>In object-oriented programming, the ability to create new classes
(or interfaces) that contain all the methods and properties of another class
(or interface), plus additional methods and properties. If class (or interface)
D inherits from class (or interface) B, then D is said to be
<term>derived</term> from B. B is said to be a <term>base</term> class (or
interface) for D. Some programming languages allow for multiple inheritance,
that is, inheritance from more than one class or interface.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-raw-struct">initial structure model</label>
<def>
<p>Also known as the <term>raw structure model</term> or the
<term>uncooked model</term>, this represents the document before it has been
modified by entity expansions, generated text, style-specified reordering, or
the execution of scripts. In some implementations, this might correspond to the
&quot;initial parse tree&quot; for the document, if it ever exists. Note that a
given implementation might not be able to provide access to the initial
structure model for a document, though an editor probably would.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-interface">interface</label>
<def>
<p>An <term>interface</term> is a declaration of a set of
<term>methods</term> with no information given about their implementation. In
object systems that support interfaces and inheritance, interfaces can usually
inherit from one another. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-lang-binding">language binding</label>
<def>
<p>A programming <term>language binding</term> for an IDL specification
is an implementation of the interfaces in the specification for the given
language. For example, a Java language binding for the Document Object Model
IDL specification would implement the concrete Java classes that provide the
functionality exposed by the interfaces.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-localname">local name</label>
<def>
<p>A <term>local name</term> is the local part of a <term>qualified
name</term>. This is called the <xtermref
href="&xml-names;/#dt-localname">local part</xtermref> in Namespaces in XML
<bibref ref="Namespaces"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-method">method</label>
<def>
<p>A <term>method</term> is an operation or function that is associated
with an object and is allowed to manipulate the object's data. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-model">model</label>
<def>
<p>A <term>model</term> is the actual data representation for the
information at hand. Examples are the structural model and the style model
representing the parse structure and the style information associated with a
document. The model might be a tree, or a directed graph, or something
else.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-namespaceprefix">namespace prefix</label>
<def>
<p>A <term>namespace prefix</term> is a string that associates an
element or attribute name with a <term>namespace URI</term> in XML. See
<xtermref href="&xml-names;/#dt-prefix">namespace prefix</xtermref> in
Namespaces in XML <bibref ref="Namespaces"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-namespaceURI">namespace URI</label>
<def>
<p>A <term>namespace URI</term> is a URI that identifies an <term>XML
namespace</term>. Strictly speaking, this actually is a <term>namespace URI
reference</term>. This is called the <xtermref
href="&xml-names;/#dt-NSName">namespace name</xtermref> in Namespaces in XML
<bibref ref="Namespaces"/>.</p>
</def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-object-model">object model</label>
<def>
<p>An <term>object model</term> is a collection of descriptions of
classes or interfaces, together with their member data, member functions, and
class-static operations. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-parent">parent</label>
<def>
<p>A <term>parent</term> is an immediate <term>ancestor</term> node of
a node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-qualifiedname">qualified name</label>
<def>
<p>A <term>qualified name</term> is the name of an element or attribute
defined as the concatenation of a <term>local name</term> (as defined in this
specification), optionally preceded by a <term>namespace prefix</term> and
colon character. See <xspecref href="&xml-names;/#ns-qualnames">Qualified
Names</xspecref> in Namespaces in XML <bibref ref="Namespaces"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-readonly-node">readonly node</label>
<def>
<p>A <term>readonly node</term> is a node that is immutable. This means
its list of children, its content, and its attributes, when it is an element,
cannot be changed in any way. However, a readonly node can possibly be moved,
when it is not itself contained in a readonly node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-root-node">root node</label>
<def>
<p>The <term>root node</term> is the unique node that is not a
<term>child</term> of any other node. All other nodes are children or other
descendants of the root node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-sibling">sibling</label>
<def>
<p>Two nodes are <term>siblings</term> if and only if they have the
same <term>parent</term> node.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-string-compare">string comparison</label>
<def>
<p>When string matching is required, it is to occur as though the
comparison was between 2 sequences of code points from the Unicode 3.0 standard
<bibref ref="Unicode"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-tag-valid">tag valid document</label>
<def>
<p>A document is <term>tag valid</term> if all begin and end tags are
properly balanced and nested.</p></def>
</gitem><!-- ................................................................ -->
<gitem><label id="dt-token">token</label><def>
<p>An information item such as an
<xtermref href="http://www.w3.org/TR/REC-xml.html#NT-Name">XML Name</xtermref>
which has been <termref def="dt-tokenized">tokenized</termref>.</p></def>
</gitem><!-- ................................................................ -->
<gitem><label id="dt-tokenized">tokenized</label><def>
<p>The description given to various information items (for example,
attribute values of various types, but not including the StringType CDATA)
after having been processed by the XML processor. The process includes
stripping leading and trailing white space, and replacing multiple space
characters by one. See the definition of
<xtermref href="http://www.w3.org/TR/REC-xml.html#NT-TokenizedType">tokenized
type</xtermref>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-type-valid">type valid document</label>
<def>
<p>A document is <term>type valid</term> if it conforms to an explicit
DTD.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-uncooked">uncooked model</label>
<def>
<p>See initial structure model.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-well-formed">well-formed document</label>
<def>
<p>A document is <term>well-formed</term> if it is tag valid and
entities are limited to single elements (i.e., single sub-trees). See
<xspecref href="&xml-spec;#sec-well-formed"> Well-Formed XML
Documents</xspecref> in XML <bibref ref="XML"/>.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-XML">XML</label>
<def>
<p>Extensible Markup Language (<term>XML</term>) is an extremely simple
dialect of SGML. The goal is to enable generic SGML to be served, received, and
processed on the Web in the way that is now possible with HTML. XML
<bibref ref="XML"/> has been designed for ease of implementation and for
interoperability with both SGML and HTML.</p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-XML-name">XML name</label>
<def>
<p>See <xspecref href="&xml-spec;#NT-Name">XML name</xspecref> in the
XML specification <bibref ref="XML"/>. </p></def>
</gitem><!-- ................................................................ -->
<gitem>
<label id="dt-XML-namespace">XML namespace</label>
<def>
<p>An <term>XML namespace</term> is a collection of names, identified
by a URI reference <bibref ref="URIRef"/>, which are used in XML documents as
element types and attribute names. <bibref ref="Namespaces"/></p></def>
</gitem><!-- ................................................................ -->
</glist></div1><!--
*************************************************************************
* END OF DOM GLOSSARY *
*************************************************************************
-->
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF DOM INDEX *
*************************************************************************
-->
<div1 role="index" id="Index">
<head>Index</head>
<?GENERATE-DEFINITION-INDEX?>
</div1>
<!--
*************************************************************************
* END OF DOM INDEX *
*************************************************************************
-->
+29
View File
@@ -0,0 +1,29 @@
<!-- $Id$ -->
<!ENTITY charmod "http://www.w3.org/TR/1999/WD-charmod-19991129">
<!ENTITY CSS "http://www.w3.org/Style/CSS">
<!ENTITY css2 "http://www.w3.org/TR/1998/REC-CSS2-19980512">
<!ENTITY com "http://www.microsoft.com/com">
<!ENTITY corba "http://sisyphus.omg.org/technology/documents/formal/corba_2.htm">
<!ENTITY domlevel1 "http://www.w3.org/TR/REC-DOM-Level-1">
<!ENTITY ecma-262 "http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM">
<!ENTITY html40 "http://www.w3.org/TR/1998/REC-html40-19980424">
<!ENTITY infoset "http://www.w3.org/TR/xml-infoset">
<!ENTITY java "http://java.sun.com/docs/books/jls">
<!ENTITY javaidl "http://java.sun.com/products/jdk/1.2/docs/guide/idl">
<!ENTITY javascript
"http://developer.netscape.com/tech/javascript/resources.html">
<!ENTITY jscript
"http://msdn.microsoft.com/scripting/default.htm">
<!ENTITY msidl
"http://msdn.microsoft.com/library/psdk/midl/mi-laref_1r1h.htm">
<!ENTITY omg "http://www.omg.org">
<!ENTITY xhtml10 "http://www.w3.org/TR/2000/REC-xhtml1-20000126">
<!ENTITY xml-names "http://www.w3.org/TR/1999/REC-xml-names-19990114">
<!ENTITY xpointer "http://www.w3.org/TR/xptr">
<!ENTITY xml-spec "http://www.w3.org/TR/1998/REC-xml-19980210">
<!ENTITY xml-stylesheet "http://www.w3.org/1999/06/REC-xml-stylesheet-19990629">
<!-- Namespaces -->
<!ENTITY xmlns-ns "http://www.w3.org/2000/xmlns/">
<!ENTITY xml-ns "http://www.w3.org/XML/1998/namespace">
+286
View File
@@ -0,0 +1,286 @@
<!-- $Id$ -->
<!--
******************************************************
| Major |
******************************************************
-->
<!ENTITY status SYSTEM "status.xml">
<!ENTITY toc SYSTEM "toc.xml">
<!ENTITY index SYSTEM "index.xml">
<!ENTITY copyright SYSTEM "copyright.xml">
<!ENTITY object-index SYSTEM "object-index.xml">
<!ENTITY idl SYSTEM "idl.xml">
<!ENTITY java-binding SYSTEM "java-binding.xml">
<!ENTITY ecma-binding SYSTEM "ecma-binding.xml">
<!ENTITY contributors SYSTEM "contributors.xml">
<!ENTITY glossary SYSTEM "glossary.xml">
<!ENTITY definition-index SYSTEM "definition-index.xml">
<!ENTITY references SYSTEM "references.xml">
<!ENTITY introduction SYSTEM "core/introduction.xml">
<!ENTITY core SYSTEM "core/core.xml">
<!ENTITY i18nfunctions SYSTEM "core/i18nfunctions.xml">
<!ENTITY core-changes SYSTEM "core/changes.xml">
<!ENTITY html SYSTEM "html/html.xml">
<!ENTITY html-changes SYSTEM "html/changes.xml">
<!ENTITY stylesheets SYSTEM "style/stylesheets.xml">
<!ENTITY css SYSTEM "style/css.xml">
<!ENTITY events SYSTEM "events/events.xml">
<!ENTITY traversal SYSTEM "traversal-range/traversal.xml">
<!ENTITY range SYSTEM "traversal-range/range.xml">
<!ENTITY views SYSTEM "views/views.xml">
<!--
******************************************************
| Object definitions for core |
******************************************************
-->
<!ENTITY core-dom
SYSTEM "core/definitions/dom.xml">
<!ENTITY exceptions
SYSTEM "core/definitions/exceptions.xml">
<!ENTITY core-document
SYSTEM "core/definitions/document.xml">
<!ENTITY core-node
SYSTEM "core/definitions/node.xml">
<!ENTITY core-node-list
SYSTEM "core/definitions/node-list.xml">
<!ENTITY core-named-node-map
SYSTEM "core/definitions/named-node-map.xml">
<!ENTITY core-element
SYSTEM "core/definitions/element.xml">
<!ENTITY core-attribute
SYSTEM "core/definitions/attribute.xml">
<!ENTITY core-text
SYSTEM "core/definitions/text.xml">
<!ENTITY core-comment
SYSTEM "core/definitions/comment.xml">
<!ENTITY core-pi
SYSTEM "core/definitions/pi.xml">
<!ENTITY core-cdata-section
SYSTEM "core/definitions/cdata-section.xml">
<!ENTITY core-doctype
SYSTEM "core/definitions/doctype.xml">
<!ENTITY core-entity-reference
SYSTEM "core/definitions/entity-reference.xml">
<!ENTITY core-entity
SYSTEM "core/definitions/entity.xml">
<!ENTITY core-data
SYSTEM "core/definitions/data.xml">
<!ENTITY core-notation
SYSTEM "core/definitions/notation.xml">
<!--
******************************************************
| Object definitions for html |
******************************************************
-->
<!ENTITY html-entities
SYSTEM "html/definitions/entities.xml">
<!ENTITY html-htmldom
SYSTEM "html/definitions/htmldom.xml">
<!ENTITY html-htmlanchorelement
SYSTEM "html/definitions/htmlanchorelement.xml">
<!ENTITY html-htmlappletelement
SYSTEM "html/definitions/htmlappletelement.xml">
<!ENTITY html-htmlareaelement
SYSTEM "html/definitions/htmlareaelement.xml">
<!ENTITY html-htmlbaseelement
SYSTEM "html/definitions/htmlbaseelement.xml">
<!ENTITY html-htmlbasefontelement
SYSTEM "html/definitions/htmlbasefontelement.xml">
<!ENTITY html-htmlblockquoteelement
SYSTEM "html/definitions/htmlblockquoteelement.xml">
<!ENTITY html-htmlbodyelement
SYSTEM "html/definitions/htmlbodyelement.xml">
<!ENTITY html-htmlbrelement
SYSTEM "html/definitions/htmlbrelement.xml">
<!ENTITY html-htmlbuttonelement
SYSTEM "html/definitions/htmlbuttonelement.xml">
<!ENTITY html-htmlcollection
SYSTEM "html/definitions/htmlcollection.xml">
<!ENTITY html-htmldirectoryelement
SYSTEM "html/definitions/htmldirectoryelement.xml">
<!ENTITY html-htmldivelement
SYSTEM "html/definitions/htmldivelement.xml">
<!ENTITY html-htmldlistelement
SYSTEM "html/definitions/htmldlistelement.xml">
<!ENTITY html-htmldocument
SYSTEM "html/definitions/htmldocument.xml">
<!ENTITY html-htmlelement
SYSTEM "html/definitions/htmlelement.xml">
<!ENTITY html-htmlfieldsetelement
SYSTEM "html/definitions/htmlfieldsetelement.xml">
<!ENTITY html-htmlfontelement
SYSTEM "html/definitions/htmlfontelement.xml">
<!ENTITY html-htmlformelement
SYSTEM "html/definitions/htmlformelement.xml">
<!ENTITY html-htmlframeelement
SYSTEM "html/definitions/htmlframeelement.xml">
<!ENTITY html-htmlframesetelement
SYSTEM "html/definitions/htmlframesetelement.xml">
<!ENTITY html-htmlheadelement
SYSTEM "html/definitions/htmlheadelement.xml">
<!ENTITY html-htmlheadingelement
SYSTEM "html/definitions/htmlheadingelement.xml">
<!ENTITY html-htmlhrelement
SYSTEM "html/definitions/htmlhrelement.xml">
<!ENTITY html-htmlhtmlelement
SYSTEM "html/definitions/htmlhtmlelement.xml">
<!ENTITY html-htmliframeelement
SYSTEM "html/definitions/htmliframeelement.xml">
<!ENTITY html-htmlimageelement
SYSTEM "html/definitions/htmlimageelement.xml">
<!ENTITY html-htmlinputelement
SYSTEM "html/definitions/htmlinputelement.xml">
<!ENTITY html-htmlisindexelement
SYSTEM "html/definitions/htmlisindexelement.xml">
<!ENTITY html-htmllabelelement
SYSTEM "html/definitions/htmllabelelement.xml">
<!ENTITY html-htmllegendelement
SYSTEM "html/definitions/htmllegendelement.xml">
<!ENTITY html-htmllielement
SYSTEM "html/definitions/htmllielement.xml">
<!ENTITY html-htmllinkelement
SYSTEM "html/definitions/htmllinkelement.xml">
<!ENTITY html-htmlmapelement
SYSTEM "html/definitions/htmlmapelement.xml">
<!ENTITY html-htmlmenuelement
SYSTEM "html/definitions/htmlmenuelement.xml">
<!ENTITY html-htmlmetaelement
SYSTEM "html/definitions/htmlmetaelement.xml">
<!ENTITY html-htmlmodelement
SYSTEM "html/definitions/htmlmodelement.xml">
<!ENTITY html-htmlobjectelement
SYSTEM "html/definitions/htmlobjectelement.xml">
<!ENTITY html-htmlolistelement
SYSTEM "html/definitions/htmlolistelement.xml">
<!ENTITY html-htmloptgroupelement
SYSTEM "html/definitions/htmloptgroupelement.xml">
<!ENTITY html-htmloptionelement
SYSTEM "html/definitions/htmloptionelement.xml">
<!ENTITY html-htmlparagraphelement
SYSTEM "html/definitions/htmlparagraphelement.xml">
<!ENTITY html-htmlparamelement
SYSTEM "html/definitions/htmlparamelement.xml">
<!ENTITY html-htmlpreelement
SYSTEM "html/definitions/htmlpreelement.xml">
<!ENTITY html-htmlquoteelement
SYSTEM "html/definitions/htmlquoteelement.xml">
<!ENTITY html-htmlscriptelement
SYSTEM "html/definitions/htmlscriptelement.xml">
<!ENTITY html-htmlselectelement
SYSTEM "html/definitions/htmlselectelement.xml">
<!ENTITY html-htmlstyleelement
SYSTEM "html/definitions/htmlstyleelement.xml">
<!ENTITY html-htmltablecaptionelement
SYSTEM "html/definitions/htmltablecaptionelement.xml">
<!ENTITY html-htmltablecellelement
SYSTEM "html/definitions/htmltablecellelement.xml">
<!ENTITY html-htmltablecolelement
SYSTEM "html/definitions/htmltablecolelement.xml">
<!ENTITY html-htmltableelement
SYSTEM "html/definitions/htmltableelement.xml">
<!ENTITY html-htmltablerowelement
SYSTEM "html/definitions/htmltablerowelement.xml">
<!ENTITY html-htmltablesectionelement
SYSTEM "html/definitions/htmltablesectionelement.xml">
<!ENTITY html-htmltextareaelement
SYSTEM "html/definitions/htmltextareaelement.xml">
<!ENTITY html-htmltitleelement
SYSTEM "html/definitions/htmltitleelement.xml">
<!ENTITY html-htmlulistelement
SYSTEM "html/definitions/htmlulistelement.xml">
<!--
******************************************************
| Object definitions for stylesheets |
******************************************************
-->
<!ENTITY stylesheets-stylesheet
SYSTEM "style/definitions/StyleSheet.xml">
<!ENTITY stylesheets-stylesheetlist
SYSTEM "style/definitions/StyleSheetList.xml">
<!ENTITY stylesheets-medialist
SYSTEM "style/definitions/MediaList.xml">
<!ENTITY stylesheets-documentstyle
SYSTEM "style/definitions/DocumentStyle.xml">
<!ENTITY stylesheets-linkstyle
SYSTEM "style/definitions/LinkStyle.xml">
<!--
******************************************************
| Object definitions for css |
******************************************************
-->
<!ENTITY css-cssstylesheet
SYSTEM "style/definitions/CSSStyleSheet.xml">
<!ENTITY css-cssrulelist
SYSTEM "style/definitions/CSSRuleList.xml">
<!ENTITY css-cssrule
SYSTEM "style/definitions/CSSRule.xml">
<!ENTITY css-cssstylerule
SYSTEM "style/definitions/CSSStyleRule.xml">
<!ENTITY css-cssmediarule
SYSTEM "style/definitions/CSSMediaRule.xml">
<!ENTITY css-cssfontfacerule
SYSTEM "style/definitions/CSSFontFaceRule.xml">
<!ENTITY css-csspagerule
SYSTEM "style/definitions/CSSPageRule.xml">
<!ENTITY css-cssimportrule
SYSTEM "style/definitions/CSSImportRule.xml">
<!ENTITY css-csscharsetrule
SYSTEM "style/definitions/CSSCharsetRule.xml">
<!ENTITY css-cssrule
SYSTEM "style/definitions/CSSRule.xml">
<!ENTITY css-cssunknownrule
SYSTEM "style/definitions/CSSUnknownRule.xml">
<!ENTITY css-cssstyledeclaration
SYSTEM "style/definitions/CSSStyleDeclaration.xml">
<!ENTITY css-css2properties
SYSTEM "style/definitions/CSS2Properties.xml">
<!ENTITY css-cssvalue
SYSTEM "style/definitions/CSSValue.xml">
<!ENTITY css-cssvaluelist
SYSTEM "style/definitions/CSSValueList.xml">
<!ENTITY css-cssprimitivevalue
SYSTEM "style/definitions/CSSPrimitiveValue.xml">
<!ENTITY css-rect
SYSTEM "style/definitions/Rect.xml">
<!ENTITY css-rgbcolor
SYSTEM "style/definitions/RGBColor.xml">
<!ENTITY css-counter
SYSTEM "style/definitions/Counter.xml">
<!ENTITY css-viewcss
SYSTEM "style/definitions/ViewCSS.xml">
<!ENTITY css-documentcss
SYSTEM "style/definitions/DocumentCSS.xml">
<!ENTITY css-elementcssinlinestyle
SYSTEM "style/definitions/ElementCSSInlineStyle.xml">
<!ENTITY css-domimplementationcss
SYSTEM "style/definitions/DOMImplementationCSS.xml">
<!--
******************************************************
| Object definitions for level two events |
******************************************************
-->
<!ENTITY events-event
SYSTEM "events/definitions/event.xml">
<!ENTITY events-eventlistener
SYSTEM "events/definitions/eventlistener.xml">
<!ENTITY events-eventtarget
SYSTEM "events/definitions/eventtarget.xml">
<!ENTITY events-mutationevent
SYSTEM "events/definitions/mutationevent.xml">
<!ENTITY events-uievent
SYSTEM "events/definitions/uievent.xml">
<!ENTITY events-mouseevent
SYSTEM "events/definitions/mouseevent.xml">
<!ENTITY events-documentevent
SYSTEM "events/definitions/documentevent.xml">
<!ENTITY events-eventexception
SYSTEM "events/definitions/eventexception.xml">
+237
View File
@@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
*************************************************************************
* BEGINNING OF REFERENCES *
*************************************************************************
-->
<div1 role="references" id="References">
<head>References</head>
<p>
For the latest version of any W3C specification please consult the list of
<loc href='http://www.w3.org/TR'>W3C Technical Reports</loc> available at
http://www.w3.org/TR.
</p>
<div2 id='References-Normative'>
<head>Normative references</head>
<blist>
<bibl id='Charmod' key='Charmod'>
W3C (World Wide Web Consortium) <loc href='&charmod;'>Character Model
for the World Wide Web</loc>, November 1999. Available at &charmod;
</bibl>
<bibl id='DOMCore' key='DOM Level 2 Core'>
W3C (World Wide Web Consortium) <loc href='&core.url;'>Document Object
Model Level 2 Core Specification</loc>, &date.month;
&date.year;. Available at &core.url;
</bibl>
<bibl id='CSS2' key='CSS2'>
W3C (World Wide Web Consortium) <loc href='&css2;'>Cascading Style Sheets,
level 2 Specification</loc>, May 1998. Available at &css2;
</bibl>
<bibl id='ECMAScript' key='ECMAScript'>
ECMA (European Computer Manufacturers Association) <loc
href='&ecma-262;'>ECMAScript Language Specification</loc>. Available at
&ecma-262;
</bibl>
<bibl id='DOMEvents' key='DOM Level 2 Events'>
W3C (World Wide Web Consortium) <loc href='&events.url;'>Document Object
Model Level 2 Events Specification</loc>, &date.month;
&date.year;. Available at &events.url;
</bibl>
<bibl id='HTML40' key='HTML4.0'>
W3C (World Wide Web Consortium) <loc href='&html40;'>HTML 4.0
Specification</loc>, April 1998. Available at &html40;
</bibl>
<bibl id='ISO10646' key='ISO/IEC 10646'>
ISO (International Organization for Standardization). ISO/IEC 10646-1:2000
(E). Information technology - Universal Multiple-Octet Coded
Character Set (UCS) - Part 1: Architecture and Basic Multilingual
Plane. [Geneva]: International Organization for Standardization.
</bibl>
<bibl id='Java' key='Java'>
Sun Microsystems Inc. <loc href='&java;'>The Java Language
Specification</loc>, James Gosling, Bill Joy, and Guy Steele, September
1996. Available at &java;
</bibl>
<bibl id='Namespaces' key='Namespaces'>
W3C (World Wide Web Consortium) <loc href='&xml-names;'>Namespaces in
XML</loc>, January 1999. Available at &xml-names;
</bibl>
<bibl id='OMGIDL' key='OMGIDL'>
OMG (<loc href='http://www.omg.org/'>Object Management Group</loc>) IDL
(Interface Definition Language) defined in The Common Object Request
Broker: Architecture and Specification, version 2.3.1, October
1999. Available from http://www.omg.org/
</bibl>
<bibl id='DOMStyle' key='DOM Level 2 Style Sheets and CSS'>
W3C (World Wide Web Consortium) <loc href='&style.url;'>Document Object
Model Level 2 Style Sheets and CSS Specification</loc>, &date.month;
&date.year;. Available at &style.url;
</bibl>
<bibl id='DOMTraversal-Range' key='DOM Level 2 Traversal and Range'>
W3C (World Wide Web Consortium) <loc
href='&traversal-range.url;'>Document Object Model Level 2 Traversal
and Range Specification</loc>, &date.month; &date.year;. Available at
&traversal-range.url;
</bibl>
<bibl id='URIRef' key='RFC2396'>
IETF (Internet Engineering Task Force) <loc
href='http://www.ietf.org/rfc/rfc2396.txt'>RFC 2396: Uniform Resource
Identifiers (URI): Generic Syntax</loc>, eds. T. Berners-Lee,
R. Fielding, L. Masinter. August 1998. Available at
http://www.ietf.org/rfc/rfc2396.txt
</bibl>
<bibl id='Unicode' key='Unicode'>
The Unicode Consortium. <loc
href="http://www.unicode.org/unicode/standard/versions/Unicode3.0.html">The
Unicode Standard, Version 3.0.</loc>, February 2000. Available at
http://www.unicode.org/unicode/standard/versions/Unicode3.0.html.
</bibl>
<bibl id='DOMViews' key='DOM Level 2 Views'>
W3C (World Wide Web Consortium) <loc href='&views.url;'>Document Object
Model Level 2 Views Specification</loc>, &date.month;
&date.year;. Available at &views.url;
</bibl>
<bibl id='XML' key='XML'>
W3C (World Wide Web Consortium) <loc href='&xml-spec;'>Extensible Markup
Language (XML) 1.0</loc>, February 1998. Available at &xml-spec;
</bibl>
<bibl id='XML-StyleSheet' key='XML-StyleSheet'>
W3C (World Wide Web Consortium) <loc href='&xml-stylesheet;'>Associating
Style Sheets with XML documents Version 1.0</loc>, June 1999. Available at
&xml-stylesheet;.
</bibl>
</blist>
</div2>
<div2 id='References-Informative'>
<head>Informative references</head>
<blist>
<bibl id='DOMCSS-inf' key='DOM Level 2 CSS'>
W3C (World Wide Web Consortium) <loc href='&style.latest.url;/css'>Document Object
Model Level 2 CSS</loc>. Available at &style.latest.url;/css
</bibl>
<bibl id='COM' key='COM'>
Microsoft Corp. <loc href='&com;'>The Component Object Model</loc>. Available
at &com;
</bibl>
<bibl id='CORBA' key='CORBA'>
OMG (<loc href='http://www.omg.org/'>Object Management Group</loc>) The
Common Object Request Broker: Architecture and Specification, version
2.3.1, October 1999. Available from http://www.omg.org/
</bibl>
<bibl id='DOM-Level-1' key='DOM Level 1'>
W3C (World Wide Web Consortium) <loc href='&domlevel1;'>DOM Level 1
Specification</loc>, October 1998. Available at &domlevel1;
</bibl>
<bibl id='DOMHTML-inf' key='DOM Level 2 HTML'>
W3C (World Wide Web Consortium) <loc href='&html.latest.url;'>Document Object
Model Level 2 HTML Specification</loc>. Available at &html.latest.url;
</bibl>
<bibl id='DOM-Level-3-Requirements' key='DOM-Level-3-Requirements'>
W3C (World Wide Web Consortium) <loc
href='http://www.w3.org/TR/DOM-Requirements/#Level3'>DOM Requirements
for DOM Level 3</loc>, Available at
http://www.w3.org/TR/DOM-Requirements/#Level3
</bibl>
<bibl id='DOMEvents-inf' key='DOM Level 2 Events'>
W3C (World Wide Web Consortium) <loc href='&events.latest.url;'>Document
Object Model Level 2 Events Specification</loc>. Available at &events.latest.url;
</bibl>
<bibl id='InfoSet' key='Infoset'>
W3C (World Wide Web Consortium) <loc href='&infoset;'>XML Information
Set</loc>, December 1999. Available at &infoset;
</bibl>
<bibl id='JavaIDL' key='JavaIDL'>
Sun Microsystems Inc. <loc href='&javaidl;'>Java IDL</loc>. Available
at &javaidl;
</bibl>
<bibl id='JavaScript' key='JavaScript'>
Netscape Communications Corp. <loc href='&javascript;'>JavaScript
Resources</loc>. Available at &javascript;
</bibl>
<bibl id='JScript' key='JScript'>
Microsoft Corp. <loc href='&jscript;'>JScript
Resources</loc>. Available at &jscript;
</bibl>
<bibl id='MSIDL' key='MIDL'>
Microsoft Corp. <loc href='&msidl;'>MIDL Language
Reference</loc>. Available at &msidl;
</bibl>
<bibl id='DOMStyleSheets-inf' key='DOM Level 2 Style Sheets'>
W3C (World Wide Web Consortium) <loc href='&style.latest.url;/stylesheets'>Document Object
Model Level 2 Style Sheets</loc>. Available at &style.latest.url;/stylesheets
</bibl>
<bibl id='DOMTraversal-inf' key='DOM Level 2 Traversal'>
W3C (World Wide Web Consortium) <loc
href='&traversal-range.latest.url;/traversal'>Document Object Model Level
2 Traversal</loc>. Available at
&traversal-range.latest.url;/traversal
</bibl>
<bibl id='DOMRange-inf' key='DOM Level 2 Range'>
W3C (World Wide Web Consortium) <loc
href='&traversal-range.latest.url;/ranges.html'>Document Object Model Level
2 Range</loc>. Available at
&traversal-range.latest.url;/ranges
</bibl>
<bibl id='DOMViews-inf' key='DOM Level 2 Views'>
W3C (World Wide Web Consortium) <loc href='&views.latest.url;'>Document Object
Model Level 2 Views Specification</loc>. Available at &views.latest.url;
</bibl>
<bibl id='XHTML10' key='XHTML10'>
W3C (World Wide Web Consortium) <loc href='&xhtml10;'>XHTML 1.0:
Extensible HyperText Markup Language</loc>, A Reformulation of HTML 4.0
in XML 1.0. Available at &xhtml10;
</bibl>
<bibl id='XPointer' key='XPointer'>
W3C (World Wide Web Consortium) <loc href='&xpointer;'>XML Pointer
Language (XPointer)</loc>, June 2000. Available at &xpointer;
</bibl>
</blist>
</div2>
</div1>
<!--
*************************************************************************
* END OF REFERENCES *
*************************************************************************
-->
+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--
*************************************************************************
* BEGINNING OF LEVEL TWO CSS *
*************************************************************************
-->
<div1 id="CSS">
<head>Document Object Model CSS</head>
<orglist role="editors">
<member>
<name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation>
</member>
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="CSS-overview">
<head>Overview of the DOM Level 2 CSS Interfaces</head>
<p>
The DOM Level 2 Cascading Style Sheets (<loc href="&CSS;">CSS</loc>)
interfaces are designed with the goal of exposing CSS constructs to
object model consumers. Cascading Style Sheets is a declarative syntax
for defining presentation rules, properties and ancillary constructs used
to format and render Web documents. This document specifies a mechanism
to programmatically access and modify the rich style and presentation
control provided by CSS (specifically CSS level 2 <bibref
ref='CSS2'/>). This augments CSS by providing a mechanism to dynamically
control the inclusion and exclusion of individual style sheets, as well
as manipulate CSS rules and properties.
</p>
<p>
The CSS interfaces are organized in a logical, rather than
physical structure. A collection of all style sheets
referenced by or embedded in the document is accessible on
the document interface. Each item in this collection exposes
the properties common to all style sheets referenced or embedded
in HTML and XML documents; this interface is described in the
<specref ref="StyleSheets"/>. User style sheets are
not accessible through this collection, in part due to potential
privacy concerns (and certainly read-write issues).
</p>
<p>
For each CSS style sheet, an additional interface is exposed - the
<code>CSSStyleSheet</code> interface. This interface allows access to
the collection of rules within a CSS style sheet and methods to modify
that collection. Interfaces are provided for each specific type of rule
in CSS2 (e.g. style declarations, <code>@import</code> rules, or
<code>@font-face</code> rules), as well as a shared generic
<code>CSSRule</code> interface.
</p>
<p>
The most common type of rule is a style declaration. The
<code>CSSStyleRule</code> interface that represents this type of rule
provides string access to the CSS selector of the rule, and access to the
property declarations through the <code>CSSStyleDeclaration</code>
interface.
</p>
<p>
Finally, an optional <code>CSS2Properties</code> interface is described;
this interface (if implemented) provides shortcuts to the string
values of all the properties in CSS level 2.
</p>
<p>
All CSS objects in the DOM are "live", that is, a change in the style sheet
is reflected in the computed and actual style.
</p>
</div2>
<div2 id="CSS-fundamental">
<head>CSS Fundamental Interfaces</head>
<p>
The interfaces within this section are considered fundamental CSS
interfaces, and must be supported by all conforming implementations of
the CSS module. These interfaces represent CSS style sheets specifically.
</p>
<p>
A DOM application may use the <code>hasFeature(feature, version)</code>
method of the <code>DOMImplementation</code> interface with parameter
values "CSS" and "2.0" (respectively) to determine whether or not this
module is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined
defined in the DOM Level 2 Core specification <bibref ref="DOMCore"/> and
the "Views" feature defined in the DOM Level 2 Views specification
<bibref ref="DOMViews"/>. Please refer to additional information about
<xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<definitions>
&css-cssstylesheet;
&css-cssrulelist;
&css-cssrule;
&css-cssstylerule;
&css-cssmediarule;
&css-cssfontfacerule;
&css-csspagerule;
&css-cssimportrule;
&css-csscharsetrule;
&css-cssunknownrule;
&css-cssstyledeclaration;
&css-cssvalue;
&css-cssprimitivevalue;
&css-cssvaluelist;
&css-rgbcolor;
&css-rect;
&css-counter;
</definitions>
<div3 id="CSS-OverrideAndComputed">
<head>Override and computed style sheet</head>
<definitions>
&css-viewcss;
&css-documentcss;
</definitions>
</div3>
<div3 id="CSS-StyleSheetCreation">
<head>Style sheet creation</head>
<definitions>
&css-domimplementationcss;
</definitions>
</div3>
<div3 id="CSS-htmlelementcss">
<head>Element with CSS inline style</head>
<definitions>
&css-elementcssinlinestyle;
</definitions>
</div3>
</div2>
<div2 id="CSS-extended">
<head>CSS2 Extended Interface</head>
<p>
The interface found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"CSS2" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "CSS" feature defined
defined in <specref ref="CSS-fundamental"/>. Please refer to additional
information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
<definitions>
&css-css2properties;
</definitions>
</div2>
</div1>
<!--
*************************************************************************
* END OF LEVEL TWO CSS *
*************************************************************************
-->
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSCharsetRule interface -->
<interface id="CSS-CSSCharsetRule" name="CSSCharsetRule"
inherits="CSSRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSCharsetRule</code> interface represents a <xspecref
href="&css2;/syndata.html#x66">@charset
rule</xspecref> in a CSS style sheet. The value of the
<code>encoding</code> attribute does not affect the encoding of
text data in the DOM objects; this encoding is always UTF-16. After a
stylesheet is loaded, the value of the <code>encoding</code> attribute is
the value found in the <code>@charset</code> rule. If there was no
<code>@charset</code> in the original document, then no
<code>CSSCharsetRule</code> is created. The value of the
<code>encoding</code> attribute may also be used as a hint for the
encoding used on serialization of the style sheet.
</p>
<p>
The value of the <xspecref href="&css2;/syndata.html#x66">@charset
rule</xspecref> (and therefore of the <code>CSSCharsetRule</code>) may
not correspond to the encoding the document actually came in; character
encoding information e.g. in an HTTP header, has priority (see <xspecref
href="&css2;/syndata.html#x66">CSS document representation</xspecref>) but this is
not reflected in the <code>CSSCharsetRule</code>.
</p>
</descr>
<attribute type="DOMString" readonly="no" name="encoding" id="CSS-CSSCharsetRule-encoding">
<descr>
<p>
The encoding information used in this <code>@charset</code> rule.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified encoding value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
</interface>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSFontFaceRule interface -->
<interface name="CSSFontFaceRule" inherits="CSSRule"
id="CSS-CSSFontFaceRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSFontFaceRule</code> interface represents a <xspecref href="&css2;/fonts.html#font-descriptions">@font-face
rule</xspecref> in a CSS style sheet. The <code>@font-face</code> rule
is used to hold a set of font descriptions.
</p>
</descr>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSFontFaceRule-style">
<descr>
<p>
The <xspecref href="&css2;/syndata.html#q8">declaration-block</xspecref> of this rule.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSImportRule interface -->
<interface name="CSSImportRule" inherits="CSSRule"
id="CSS-CSSImportRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSImportRule</code> interface represents a <xspecref
href="&css2;/cascade.html#at-import">@import
rule</xspecref> within a CSS style sheet. The <code>@import</code> rule is
used to import style rules from other style sheets.
</p>
</descr>
<attribute id="CSS-CSSImportRule-href" name="href" type="DOMString"
readonly="yes">
<descr>
<p>
The location of the style sheet to be imported. The attribute will not
contain the <code>"url(...)"</code> specifier around the URI.
</p>
</descr>
</attribute>
<attribute id="CSS-CSSImportRule-media" name="media" type="stylesheets::MediaList"
readonly="yes">
<descr>
<p>
A list of media types for which this style sheet may be
used.
</p>
</descr>
</attribute>
<attribute id="CSS-CSSImportRule-styleSheet" name="styleSheet"
type="CSSStyleSheet" readonly="yes">
<descr>
<p>The style sheet referred to by this rule, if it has been loaded. The
value of this attribute is <code>null</code> if the style sheet has not
yet been loaded or if it will not be loaded (e.g. if the style sheet is
for a media type not supported by the user agent).
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSMediaRule interface -->
<interface name="CSSMediaRule" inherits="CSSRule" id="CSS-CSSMediaRule"
since="DOM Level 2">
<descr>
<p>
The <code>CSSMediaRule</code> interface represents a <xspecref href="&css2;/media.html#at-media-rule">@media
rule</xspecref> in a CSS style sheet. A <code>@media</code> rule can be
used to delimit style rules for specific media types.
</p>
</descr>
<attribute id="CSS-CSSMediaRule-mediaTypes" name="media"
type="stylesheets::MediaList" readonly="yes">
<descr>
<p>
A list of <xspecref href="&css2;/media.html#media-types">media types</xspecref> for this rule.
</p>
</descr>
</attribute>
<attribute type="CSSRuleList" readonly="yes" name="cssRules" id="CSS-CSSMediaRule-cssRules">
<descr>
<p>
A list of all CSS rules contained within the media block.
</p>
</descr>
</attribute>
<method name="insertRule" id="CSS-CSSMediaRule-insertRule">
<descr>
<p>
Used to insert a new rule into the media block.
</p>
</descr>
<parameters>
<param name="rule" type="DOMString" attr="in">
<descr>
<p>
The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration.
For at-rules, this specifies both the at-identifier and the
rule content.
</p>
</descr>
</param>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the media block's rule collection of the rule
before which to insert the specified rule. If the
specified index is equal to the length of the media blocks's rule
collection, the rule will be added to the end of the media block.
</p>
</descr>
</param>
</parameters>
<returns type="unsigned long">
<descr>
<p>
The index within the media block's rule collection of the newly
inserted rule.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted
at the specified index, e.g., if an <code>@import</code> rule
is inserted after a standard rule set or other at-rule.</p>
<p>INDEX_SIZE_ERR: Raised if the specified index is not a valid
insertion point.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
readonly.</p>
<p>SYNTAX_ERR: Raised if the specified rule has a syntax error
and is unparsable.</p>
</descr>
</exception>
</raises>
</method>
<method name="deleteRule" id="CSS-CSSMediaRule-deleteRule">
<descr>
<p>
Used to delete a rule from the media block.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the media block's rule collection of the rule
to remove.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<!-- No exceptions -->
<exception name="DOMException">
<descr>
<p>INDEX_SIZE_ERR: Raised if the specified index does not correspond
to a rule in the media rule list.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is
readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSPageRule interface -->
<interface name="CSSPageRule" inherits="CSSRule" id="CSS-CSSPageRule"
since="DOM Level 2">
<descr>
<p>
The <code>CSSPageRule</code> interface represents a <xspecref
href="&css2;/page.html#page-box">@page
rule</xspecref> within a CSS style sheet. The <code>@page</code> rule is
used to specify the dimensions, orientation, margins, etc. of a page box
for paged media.
</p>
</descr>
<attribute type="DOMString" name="selectorText" id="CSS-CSSPageRule-name">
<descr>
<p>
The parsable textual representation of the page selector for the rule.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSPageRule-style">
<descr>
<p>
The <xspecref href="&css2;/syndata.html#q8">declaration-block</xspecref> of this rule.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,454 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSPrimitiveValue interface -->
<interface id="CSS-CSSPrimitiveValue" name="CSSPrimitiveValue"
inherits="CSSValue" since="DOM Level 2">
<descr>
<p>
The <code>CSSPrimitiveValue</code> interface represents a single
<xspecref href="&css2;/syndata.html#values">CSS value</xspecref>. This
interface may be used to determine the value of a specific style property
currently set in a block or to set a specific style property explicitly
within the block. An instance of this interface might be obtained from
the <code>getPropertyCSSValue</code> method of the
<code>CSSStyleDeclaration</code> interface. A
<code>CSSPrimitiveValue</code> object only occurs in a context of a CSS
property.
</p>
<p>
Conversions are allowed between absolute values (from millimeters to
centimeters, from degrees to radians, and so on) but not between relative
values. (For example, a pixel value cannot be converted to a centimeter
value.) Percentage values can't be converted since they are relative to
the parent value (or another property value). There is one exception for
color percentage values: since a color percentage value is relative to
the range 0-255, a color percentage value can be converted to a number;
(see also the <code>RGBColor</code> interface).
</p>
</descr>
<group id="CSS-CSSPrimitiveValue-types" name="UnitTypes">
<descr>
<p>An integer indicating which type of unit applies to the value.</p>
</descr>
<constant name="CSS_UNKNOWN" type="unsigned short" value="0">
<descr><p>The value is not a recognized CSS2 value. The value can only be
obtained by using the <code>cssText</code> attribute.</p></descr>
</constant>
<constant name="CSS_NUMBER" type="unsigned short" value="1">
<descr><p>The value is a simple <xspecref
href="&css2;/syndata.html#q13">number</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_PERCENTAGE" type="unsigned short" value="2">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#percentage-units">percentage</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_EMS" type="unsigned short" value="3">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(ems)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_EXS" type="unsigned short" value="4">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(exs)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PX" type="unsigned short" value="5">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(px)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_CM" type="unsigned short" value="6">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(cm)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_MM" type="unsigned short" value="7">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(mm)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_IN" type="unsigned short" value="8">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(in)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PT" type="unsigned short" value="9">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(pt)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_PC" type="unsigned short" value="10">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#length-units">length
(pc)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_DEG" type="unsigned short" value="11">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(deg)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_RAD" type="unsigned short" value="12">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(rad)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_GRAD" type="unsigned short" value="13">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#q19">angle
(grad)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_MS" type="unsigned short" value="14">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q20">time
(ms)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_S" type="unsigned short" value="15">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q20">time (s)</xspecref>.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_HZ" type="unsigned short" value="16">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q21">frequency
(Hz)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_KHZ" type="unsigned short" value="17">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#q21">frequency
(kHz)</xspecref>. The value can be obtained by using the <code>getFloatValue</code>
method.</p></descr>
</constant>
<constant name="CSS_DIMENSION" type="unsigned short" value="18">
<descr><p>The value is a number with an unknown dimension.
The value can be obtained by using the <code>getFloatValue</code> method.</p></descr>
</constant>
<constant name="CSS_STRING" type="unsigned short" value="19">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#strings">STRING</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_URI" type="unsigned short" value="20">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#uri">URI</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_IDENT" type="unsigned short" value="21">
<descr><p>The value is an <xspecref
href="&css2;/syndata.html#value-def-identifier">identifier</xspecref>.
The value can be obtained by using the <code>getStringValue</code> method.</p></descr>
</constant>
<constant name="CSS_ATTR" type="unsigned short" value="22">
<descr><p>The value is a <xspecref
href="&css2;/generate.html#x16">attribute
function</xspecref>. The value can be obtained by using the <code>getStringValue</code>
method.</p></descr>
</constant>
<constant name="CSS_COUNTER" type="unsigned short" value="23">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#counter">counter or
counters function</xspecref>. The value can be obtained by using the
<code>getCounterValue</code> method.</p></descr>
</constant>
<constant name="CSS_RECT" type="unsigned short" value="24">
<descr><p>The value is a <xspecref
href="&css2;/visufx.html#value-def-shape">rect
function</xspecref>. The value can be obtained by using the <code>getRectValue</code>
method.</p></descr>
</constant>
<constant name="CSS_RGBCOLOR" type="unsigned short" value="25">
<descr><p>The value is a <xspecref
href="&css2;/syndata.html#color-units">RGB
color</xspecref>. The value can be obtained by using the <code>getRGBColorValue</code>
method.</p></descr>
</constant>
</group>
<attribute id="CSS-CSSPrimitiveValue-primitiveType"
name="primitiveType" type="unsigned short" readonly="yes">
<descr>
<p>The type of the value as defined by the constants specified above.</p>
</descr>
</attribute>
<method id="CSS-CSSPrimitiveValue-setFloatValue" name="setFloatValue">
<descr>
<p>
A method to set the float value with a specified unit. If the property
attached with this value can not accept the specified unit or the float
value, the value will be unchanged and a <code>DOMException</code> will
be raised.
</p>
</descr>
<parameters>
<param name="unitType" type="unsigned short" attr="in">
<descr>
<p>
A unit code as defined above. The unit code can only be a float
unit type (i.e. <code>CSS_NUMBER</code>,
<code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>,
<code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>,
<code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>,
<code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>,
<code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>,
<code>CSS_HZ</code>, <code>CSS_KHZ</code>,
<code>CSS_DIMENSION</code>).
</p>
</descr>
</param>
<param name="floatValue" type="float" attr="in">
<descr>
<p>
The new float value.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the attached property doesn't support
the float value or the unit type.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getFloatValue" name="getFloatValue">
<descr>
<p>
This method is used to get a float value in a specified unit. If this
CSS value doesn't contain a float value or can't be converted into the
specified unit, a <code>DOMException</code> is raised.
</p>
</descr>
<parameters>
<param name="unitType" type="unsigned short" attr="in">
<descr>
<p>
A unit code to get the float value. The unit code can only be a
float unit type (i.e. <code>CSS_NUMBER</code>,
<code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>,
<code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>,
<code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>,
<code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>,
<code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>,
<code>CSS_HZ</code>, <code>CSS_KHZ</code>,
<code>CSS_DIMENSION</code>).
</p>
</descr>
</param>
</parameters>
<returns type="float">
<descr>
<p>
The float value in the specified unit.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float
value or if the float value can't be converted into the specified
unit.
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-setStringValue" name="setStringValue">
<descr>
<p>
A method to set the string value with the specified unit. If the
property attached to this value can't accept the specified unit or the
string value, the value will be unchanged and a
<code>DOMException</code> will be raised.
</p>
</descr>
<parameters>
<param name="stringType" type="unsigned short" attr="in">
<descr>
<p>
A string code as defined above. The string code can only be a
string unit type (i.e. <code>CSS_STRING</code>,
<code>CSS_URI</code>, <code>CSS_IDENT</code>, and
<code>CSS_ATTR</code>).
</p>
</descr>
</param>
<param name="stringValue" type="DOMString" attr="in">
<descr>
<p>
The new string value.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string
value or if the string value can't be converted into the specified
unit.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly.</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getStringValue" name="getStringValue">
<descr>
<p>
This method is used to get the string value. If the
CSS value doesn't contain a string value, a <code>DOMException</code>
is raised.
</p>
<note>
<p>
Some properties (like <loc
href="&css2;/fonts.html#propdef-font-family">'font-family'</loc> or
<loc
href="&css2;/aural.html#propdef-voice-family">'voice-family'</loc>)
convert a whitespace separated list of idents to a string.
</p>
</note>
</descr>
<parameters>
</parameters>
<returns type="DOMString">
<descr>
<p>
The string value in the current unit. The current
<code>primitiveType</code> can only be a string unit type
(i.e. <code>CSS_STRING</code>, <code>CSS_URI</code>,
<code>CSS_IDENT</code> and <code>CSS_ATTR</code>).
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string
value.
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getCounterValue" name="getCounterValue">
<descr>
<p>
This method is used to get the Counter value. If this CSS value doesn't
contain a counter value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>Counter</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="Counter">
<descr>
<p>The Counter value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a
Counter value (e.g. this is not <code>CSS_COUNTER</code>).
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getRectValue" name="getRectValue">
<descr>
<p>
This method is used to get the Rect value. If this CSS value doesn't
contain a rect value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>Rect</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="Rect">
<descr>
<p>The Rect value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect
value. (e.g. this is not <code>CSS_RECT</code>).
</p>
</descr>
</exception>
</raises>
</method>
<method id="CSS-CSSPrimitiveValue-getRGBColorValue" name="getRGBColorValue">
<descr>
<p>
This method is used to get the RGB color. If this CSS value doesn't
contain a RGB color value, a <code>DOMException</code> is
raised. Modification to the corresponding style property can be
achieved using the <code>RGBColor</code> interface.
</p>
</descr>
<parameters>
</parameters>
<returns type="RGBColor">
<descr>
<p>the RGB color value.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_ACCESS_ERR: Raised if the attached property can't return a
RGB color value (e.g. this is not <code>CSS_RGBCOLOR</code>).
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSRule interface -->
<interface name="CSSRule" id="CSS-CSSRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSRule</code> interface is the abstract base interface for any
type of CSS <xspecref
href="&css2;/syndata.html#q5">statement</xspecref>.
This includes both <xspecref
href="&css2;/syndata.html#q8">rule sets</xspecref>
and <xspecref
href="&css2;/syndata.html#at-rules">at-rules</xspecref>. An
implementation is expected to preserve all rules specified in a CSS style
sheet, even if the rule is not recognized by the parser. Unrecognized
rules are represented using the <code>CSSUnknownRule</code> interface.
</p>
</descr>
<group id="CSS-CSSRule-ruleType" name="RuleType">
<descr><p>An integer indicating which type of rule this is.</p></descr>
<constant name="UNKNOWN_RULE" type="unsigned short" value="0">
<descr><p>The rule is a <code>CSSUnknownRule</code>.</p></descr>
</constant>
<constant name="STYLE_RULE" type="unsigned short" value="1">
<descr><p>The rule is a <code>CSSStyleRule</code>.</p></descr>
</constant>
<constant name="CHARSET_RULE" type="unsigned short" value="2">
<descr><p>The rule is a <code>CSSCharsetRule</code>.</p></descr>
</constant>
<constant name="IMPORT_RULE" type="unsigned short" value="3">
<descr><p>The rule is a <code>CSSImportRule</code>.</p></descr>
</constant>
<constant name="MEDIA_RULE" type="unsigned short" value="4">
<descr><p>The rule is a <code>CSSMediaRule</code>.</p></descr>
</constant>
<constant name="FONT_FACE_RULE" type="unsigned short" value="5">
<descr><p>The rule is a <code>CSSFontFaceRule</code>.</p></descr>
</constant>
<constant name="PAGE_RULE" type="unsigned short" value="6">
<descr><p>The rule is a <code>CSSPageRule</code>.</p></descr>
</constant>
</group>
<attribute type="unsigned short" readonly="yes" name="type" id="CSS-CSSRule-type">
<descr>
<p>
The type of the rule, as defined above. The expectation is that
binding-specific casting methods can be used to cast down from an
instance of the <code>CSSRule</code> interface to the specific derived
interface implied by the <code>type</code>.
</p>
</descr>
</attribute>
<attribute type="DOMString" name="cssText" id="CSS-CSSRule-cssText">
<descr>
<p>
The parsable textual representation of the rule. This reflects the
current state of the rule and not its initial value.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>INVALID_MODIFICATION_ERR: Raised if the specified CSS string value
represents a different type of rule than the current one.</p>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at
this point in the style sheet.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleSheet" readonly="yes" name="parentStyleSheet" id="CSS-CSSRule-sheet">
<descr>
<p>
The style sheet that contains this rule.
</p>
</descr>
</attribute>
<attribute type="CSSRule" readonly="yes" name="parentRule" id="CSS-CSSRule-parentRule">
<descr>
<p>
If this rule is contained inside another rule (e.g. a style rule inside
an @media block), this is the containing rule. If this rule is not
nested inside any other rules, this returns <code>null</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSRuleList interface -->
<interface name="CSSRuleList" id="CSS-CSSRuleList"
since="DOM Level 2">
<descr>
<p>
The <code>CSSRuleList</code> interface provides the
abstraction of an ordered collection of CSS rules.
</p>
<p>
The items in the <code>CSSRuleList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute type="unsigned long" readonly="yes" name="length" id="CSS-CSSRuleList-length">
<descr>
<p>
The number of <code>CSSRules</code> in the list. The range of valid
child rule indices is <code>0</code> to <code>length-1</code> inclusive.
</p>
</descr>
</attribute>
<method name="item" id="CSS-CSSRuleList-item">
<descr>
<p>
Used to retrieve a CSS rule by ordinal index. The order in this
collection represents the order of the rules in the CSS style sheet. If
index is greater than or equal to the number of rules in the list, this
returns <code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into the collection</p></descr>
</param>
</parameters>
<returns type="CSSRule">
<descr><p>The style rule at the <code>index</code> position in the
<code>CSSRuleList</code>, or <code>null</code> if
that is not a valid index.
</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,293 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleDeclaration interface -->
<interface name="CSSStyleDeclaration" id="CSS-CSSStyleDeclaration"
since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleDeclaration</code> interface represents a single
<xspecref href="&css2;/syndata.html#block">CSS declaration block</xspecref>. This interface may be used to determine the style properties
currently set in a block or to set style properties explicitly within
the block.
</p>
<p>
While an implementation may not recognize all CSS properties within a CSS
declaration block, it is expected to provide access to all specified
properties in the style sheet through the
<code>CSSStyleDeclaration</code> interface. Furthermore, implementations
that support a specific level of CSS should correctly handle <xspecref
href="&css2;/about.html#shorthand">CSS shorthand</xspecref> properties
for that level. For a further discussion of shorthand properties, see the
<code>CSS2Properties</code> interface.
</p>
<p>
This interface is also used to provide a <b>read-only</b> access to the
<xspecref href="&css2;/cascade.html#computed-value">computed
values</xspecref> of an element. See also the <code>ViewCSS</code>
interface.
</p>
<note>
<p>
The CSS Object Model doesn't provide an access to the <xspecref
href="&css2;/cascade.html#specified-value">specified</xspecref> or
<xspecref
href="&css2;/cascade.html#specified-value">actual</xspecref> values of the
CSS cascade.
</p>
</note>
</descr>
<attribute type="DOMString" name="cssText" id="CSS-CSSStyleDeclaration-cssText">
<descr>
<p>
The parsable textual representation of the declaration block (excluding
the surrounding curly braces). Setting this attribute will result in
the parsing of the new value and resetting of all the properties in the
declaration block including the removal or addition of properties.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or a property is readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<method name="getPropertyValue" id="CSS-CSSStyleDeclaration-getPropertyValue">
<descr>
<p>
Used to retrieve the value of a CSS property if it has been explicitly
set within this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
Returns the value of the property if it has been explicitly set
for this declaration block. Returns the empty string if the property
has not been set.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="getPropertyCSSValue" id="CSS-CSSStyleDeclaration-getPropertyCSSValue">
<descr>
<p>
Used to retrieve the object representation of the value of a CSS
property if it has been explicitly set within this declaration block.
This method returns <code>null</code> if the property is a <xspecref href="&css2;/about.html#shorthand">shorthand</xspecref> property. Shorthand
property values can only be accessed and modified as strings, using
the <code>getPropertyValue</code> and <code>setProperty</code> methods.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="CSSValue">
<descr>
<p>
Returns the value of the property if it has been explicitly set for
this declaration block. Returns <code>null</code> if the property
has not been set.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="removeProperty" id="CSS-CSSStyleDeclaration-removeProperty">
<descr>
<p>
Used to remove a CSS property if it has been explicitly
set within this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
Returns the value of the property if it has been explicitly set
for this declaration block. Returns the empty string if the property
has not been set or the property name does not correspond to
a known CSS property.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or the property is readonly.</p>
</descr>
</exception>
</raises>
</method>
<method name="getPropertyPriority" id="CSS-CSSStyleDeclaration-getPropertyPriority">
<descr>
<p>
Used to retrieve the priority of a CSS property
(e.g. the <code>"important"</code> qualifier) if the property
has been explicitly set in this declaration block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref
href="&css2;/propidx.html">CSS property
index</xspecref>.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
A string representing the priority (e.g. <code>"important"</code>)
if one exists. The empty string if none exists.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<method name="setProperty" id="CSS-CSSStyleDeclaration-setProperty">
<descr>
<p>
Used to set a property value and priority within this declaration
block.
</p>
</descr>
<parameters>
<param name="propertyName" type="DOMString" attr="in">
<descr>
<p>
The name of the CSS property. See the <xspecref href="&css2;/propidx.html">CSS property index</xspecref>.
</p>
</descr>
</param>
<param name="value" type="DOMString" attr="in">
<descr>
<p>
The new value of the property.
</p>
</descr>
</param>
<param name="priority" type="DOMString" attr="in">
<descr>
<p>
The new priority of the property (e.g. <code>"important"</code>).
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p>
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified value has a syntax error
and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
readonly or the property is readonly.</p>
</descr>
</exception>
</raises>
</method>
<attribute type="unsigned long" readonly="yes" name="length" id="CSS-CSSStyleDeclaration-length">
<descr>
<p>
The number of properties that have been explicitly set in this
declaration block. The range of valid indices is 0 to length-1
inclusive.
</p>
</descr>
</attribute>
<method name="item" id="CSS-CSSStyleDeclaration-item">
<descr>
<p>
Used to retrieve the properties that have been explicitly set in
this declaration block. The order of the properties retrieved using
this method does not have to be the order in which they were set.
This method can be used to iterate over all properties in this
declaration block.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
Index of the property name to retrieve.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
The name of the property at this ordinal position. The empty string
if no property exists at this position.
</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
<attribute type="CSSRule" readonly="yes" name="parentRule" id="CSS-CSSStyleDeclaration-parentRule">
<descr>
<p>
The CSS rule that contains this declaration block or <code>null</code>
if this <code>CSSStyleDeclaration</code> is not attached to a
<code>CSSRule</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleRule interface -->
<interface name="CSSStyleRule" inherits="CSSRule"
id="CSS-CSSStyleRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleRule</code> interface represents a single <xspecref
href="&css2;/syndata.html#q8">rule set</xspecref>
in a CSS style sheet.
</p>
</descr>
<attribute type="DOMString" name="selectorText" id="CSS-CSSStyleRule-selectorText">
<descr>
<p>
The textual representation of the <xspecref
href="&css2;/selector.html">selector</xspecref>
for the rule set. The implementation may have stripped out insignificant
whitespace while parsing the selector.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified CSS string value has a syntax error
and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute type="CSSStyleDeclaration" readonly="yes" name="style" id="CSS-CSSStyleRule-style">
<descr>
<p>
The <xspecref
href="&css2;/syndata.html#q8">declaration-block</xspecref>
of this rule set.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSStyleSheet interface -->
<interface name="CSSStyleSheet" inherits="stylesheets::StyleSheet"
id="CSS-CSSStyleSheet" since="DOM Level 2">
<descr>
<p>
The <code>CSSStyleSheet</code> interface is a concrete interface used
to represent a CSS style sheet i.e., a style sheet whose content type
is "text/css".
</p>
</descr>
<attribute type="CSSRule" readonly="yes" name="ownerRule" id="CSS-CSSStyleSheet-ownerRule">
<descr>
<p>
If this style sheet comes from an <code>@import</code> rule, the
<code>ownerRule</code> attribute will contain the
<code>CSSImportRule</code>. In that case, the <code>ownerNode</code>
attribute in the <code>StyleSheet</code> interface will be
<code>null</code>. If the style sheet comes from an element or a
processing instruction, the <code>ownerRule</code> attribute will be
<code>null</code> and the <code>ownerNode</code> attribute will contain
the <code>Node</code>.
</p>
</descr>
</attribute>
<attribute type="CSSRuleList" readonly="yes" name="cssRules" id="CSS-CSSStyleSheet-cssRules">
<descr>
<p>
The list of all CSS rules contained within the style sheet.
This includes both <xspecref href="&css2;/syndata.html#q8">rule sets</xspecref> and
<xspecref href="&css2;/syndata.html#at-rules">at-rules</xspecref>.
</p>
</descr>
</attribute>
<method name="insertRule" id="CSS-CSSStyleSheet-insertRule">
<descr>
<p>
Used to insert a new rule into the style sheet. The new rule now
becomes part of the cascade.
</p>
</descr>
<parameters>
<param name="rule" type="DOMString" attr="in">
<descr>
<p>
The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration.
For at-rules, this specifies both the at-identifier and the
rule content.
</p>
</descr>
</param>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the style sheet's rule list of the rule
before which to insert the specified rule. If the
specified index is equal to the length of the style sheet's rule
collection, the rule will be added to the end of the style sheet.
</p>
</descr>
</param>
</parameters>
<returns type="unsigned long">
<descr>
<p>
The index within the style sheet's rule collection of the newly
inserted rule.
</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted
at the specified index e.g. if an <code>@import</code> rule
is inserted after a standard rule set or other at-rule.</p>
<p>INDEX_SIZE_ERR: Raised if the specified index is not a valid
insertion point.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
readonly.</p>
<p>SYNTAX_ERR: Raised if the specified rule has a syntax error
and is unparsable.</p>
</descr>
</exception>
</raises>
</method>
<method name="deleteRule" id="CSS-CSSStyleSheet-deleteRule">
<descr>
<p>
Used to delete a rule from the style sheet.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
The index within the style sheet's rule list of the rule
to remove.
</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr><p></p></descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>INDEX_SIZE_ERR: Raised if the specified index does not correspond
to a rule in the style sheet's rule list.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is
readonly.</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSUnknownRule interface -->
<interface name="CSSUnknownRule" inherits="CSSRule"
id="CSS-CSSUnknownRule" since="DOM Level 2">
<descr>
<p>
The <code>CSSUnknownRule</code> interface represents an at-rule not
supported by this user agent.
</p>
</descr>
</interface>
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- CSSValue interface -->
<interface name="CSSValue" id="CSS-CSSValue" since="DOM Level 2">
<descr>
<p>
The <code>CSSValue</code> interface represents a simple or a complex
value. A <code>CSSValue</code> object only occurs in a context of a CSS
property.
</p>
</descr>
<group id="CSS-CSSValue-types" name="UnitTypes">
<descr>
<p>An integer indicating which type of unit applies to the value.</p>
</descr>
<constant name="CSS_INHERIT" type="unsigned short" value="0">
<descr><p>The value is inherited and the <code>cssText</code> contains
"inherit".</p>
</descr>
</constant>
<constant name="CSS_PRIMITIVE_VALUE" type="unsigned short" value="1">
<descr>
<p>The value is a primitive value and an instance of the
<code>CSSPrimitiveValue</code> interface can be obtained by using
binding-specific casting methods on this instance of the
<code>CSSValue</code> interface.</p>
</descr>
</constant>
<constant name="CSS_VALUE_LIST" type="unsigned short" value="2">
<descr><p>The value is a <code>CSSValue</code> list and an instance of
the <code>CSSValueList</code> interface can be obtained by using
binding-specific casting methods on this instance of the
<code>CSSValue</code> interface.</p>
</descr>
</constant>
<constant name="CSS_CUSTOM" type="unsigned short" value="3">
<descr><p>The value is a custom value.</p>
</descr>
</constant>
</group>
<attribute id="CSS-CSSValue-cssText" name="cssText" type="DOMString" readonly="no">
<descr>
<p>
A string representation of the current value.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>
SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error (according to the attached property) or is unparsable.
</p>
<p>INVALID_MODIFICATION_ERR: Raised if the specified CSS string value
represents a different type of values than the values allowed by
the CSS property.</p>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute id="CSS-CSSValue-cssValueType" name="cssValueType" type="unsigned short" readonly="yes">
<descr>
<p>
A code defining the type of the value as defined above.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- the CSSValueList interface -->
<interface id="CSS-CSSValueList" name="CSSValueList"
inherits="CSSValue" since="DOM Level 2">
<descr>
<p>The <code>CSSValueList</code> interface provides the abstraction of an
ordered collection of CSS values.</p>
<p>
Some properties allow an empty list into their syntax. In that case,
these properties take the <code>none</code> identifier. So, an empty list
means that the property has the value <code>none</code>.
</p>
<p>
The items in the <code>CSSValueList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute id="CSS-CSSValueList-length" name="length"
type="unsigned long" readonly="yes">
<descr>
<p>The number of <code>CSSValues</code> in the list. The range of valid
values of the indices is <code>0</code> to <code>length-1</code>
inclusive.</p>
</descr>
</attribute>
<method id="CSS-CSSValueList-item" name="item">
<descr>
<p>Used to retrieve a <code>CSSValue</code> by ordinal index. The order in this
collection represents the order of the values in the CSS style
property. If index is greater than or equal to the number of values in the list, this
returns <code>null</code>.</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>Index into the collection.</p>
</descr>
</param>
</parameters>
<returns type="CSSValue">
<descr>
<p>The <code>CSSValue</code> at the <code>index</code> position in the
<code>CSSValueList</code>, or <code>null</code> if that is not a valid
index.</p>
</descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Counter interface -->
<interface id="CSS-Counter" name="Counter" since="DOM Level 2">
<descr>
<p>
The <code>Counter</code> interface is used to represent any <xspecref href="&css2;/syndata.html#value-def-counter">counter or
counters function</xspecref> value. This interface reflects the values in
the underlying style property.
</p>
</descr>
<attribute id="CSS-Counter-identifier" name="identifier" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the identifier of the counter.
</p>
</descr>
</attribute>
<attribute id="CSS-Counter-listStyle" name="listStyle" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the style of the list.
</p>
</descr>
</attribute>
<attribute id="CSS-Counter-separator" name="separator" type="DOMString" readonly="yes">
<descr>
<p>
This attribute is used for the separator of the nested counters.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="CSS-DOMImplementationCSS" name="DOMImplementationCSS" since="DOM
Level 2" inherits="DOMImplementation">
<descr>
<p>
This interface allows the DOM user to create a <code>CSSStyleSheet</code>
outside the context of a document. There is no way to associate the new
<code>CSSStyleSheet</code> with a document in DOM Level 2.
</p>
</descr>
<method id='CSS-DOMImplementationCSS-createCSSStyleSheet' name="createCSSStyleSheet">
<descr>
<p>Creates a new <code>CSSStyleSheet</code>.</p>
</descr>
<parameters>
<param name="title" type="DOMString" attr="in">
<descr>
<p>
The advisory title. See also the <specref
ref="StyleSheets-StyleSheet-title"/> section.
</p>
</descr>
</param>
<param name="media" type="DOMString" attr="in">
<descr>
<p>
The comma-separated list of media associated with the new style
sheet. See also the <specref ref="StyleSheets-StyleSheet-media"/>
section.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleSheet">
<descr>
<p>A new CSS style sheet.</p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
SYNTAX_ERR: Raised if the specified media string value has a syntax
error and is unparsable.
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- DocumentCSS interface -->
<interface id="CSS-DocumentCSS" name="DocumentCSS"
inherits="stylesheets::DocumentStyle" since="DOM Level 2">
<descr>
<p>This interface represents a document with a CSS view.</p>
<p>
The <code>getOverrideStyle</code> method provides a mechanism through
which a DOM author could effect immediate change to the style of an
element without modifying the explicitly linked style sheets of a
document or the inline style of elements in the style sheets. This style
sheet comes after the author style sheet in the cascade algorithm and is
called <emph>override style sheet</emph>. The override style sheet takes
precedence over author style sheets. An "!important" declaration still
takes precedence over a normal declaration. Override, author, and user
style sheets all may contain "!important" declarations. User "!important"
rules take precedence over both override and author "!important" rules,
and override "!important" rules take precedence over author "!important"
rules.
</p>
<p>
The expectation is that an instance of the <code>DocumentCSS</code>
interface can be obtained by using binding-specific casting methods on an
instance of the <code>Document</code> interface.
</p>
</descr>
<method id="CSS-DocumentCSS-getOverrideStyle" name="getOverrideStyle">
<descr>
<p>
This method is used to retrieve the override style declaration for a
specified element and a specified pseudo-element.
</p>
</descr>
<parameters>
<param name="elt" type="Element" attr="in">
<descr>
<p>
The element whose style is to be modified. This parameter cannot
be null.
</p>
</descr>
</param>
<param name="pseudoElt" type="DOMString" attr="in">
<descr>
<p>
The pseudo-element or <code>null</code> if none.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleDeclaration">
<descr>
<p>
The override style declaration.
</p>
</descr>
</returns>
<raises>
</raises>
</method>
</interface>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- DocumentStyle interface -->
<interface name="DocumentStyle" id="StyleSheets-StyleSheet-DocumentStyle"
since="DOM Level 2">
<descr>
<p>
The <code>DocumentStyle</code> interface provides a mechanism by which
the style sheets embedded in a document can be retrieved. The expectation
is that an instance of the <code>DocumentStyle</code> interface can be
obtained by using binding-specific casting methods on an instance of the
<code>Document</code> interface.
</p>
</descr>
<attribute type="StyleSheetList" readonly="yes" name="styleSheets" id="StyleSheets-DocumentStyle-styleSheets">
<descr>
<p>
A list containing all the style sheets explicitly linked into or
embedded in a document. For HTML documents, this includes external
style sheets, included via the HTML
<xspecref href="&html40;/struct/links.html#h-12.3">
LINK</xspecref> element, and inline
<xspecref href="&html40;/present/styles.html#h-14.2.3">
STYLE</xspecref> elements. In XML, this includes external
style sheets, included via style sheet
processing instructions (see <bibref ref="XML-StyleSheet"/>).
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Counter interface -->
<interface id="CSS-ElementCSSInlineStyle" name="ElementCSSInlineStyle"
since="DOM Level 2">
<descr>
<p>
Inline style information attached to elements is exposed through the
<code>style</code> attribute. This represents the contents of the
<xspecref href="&html40;/present/styles.html#h-14.2.2">STYLE</xspecref>
attribute for HTML elements (or elements in other schemas or DTDs which
use the STYLE attribute in the same way). The expectation is that an
instance of the ElementCSSInlineStyle interface can be obtained by using
binding-specific casting methods on an instance of the Element interface
when the element supports inline CSS style informations.
</p>
</descr>
<attribute id="CSS-ElementCSSInlineStyle-style" name="style"
type="CSSStyleDeclaration" readonly="yes">
<descr>
<p>
The style attribute.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="StyleSheets-LinkStyle" name="LinkStyle" since="DOM Level 2">
<descr>
<p>
The <code>LinkStyle</code> interface provides a mechanism by which a
style sheet can be retrieved from the node responsible for linking it
into a document. An instance of the <code>LinkStyle</code> interface can
be obtained using binding-specific casting methods on an instance of a
linking node (<code>HTMLLinkElement</code>, <code>HTMLStyleElement</code>
or <code>ProcessingInstruction</code> in DOM Level 2).
</p>
</descr>
<attribute id="StyleSheets-LinkStyle-sheet" name="sheet"
type="StyleSheet" readonly="yes">
<descr>
<p>
The style sheet.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<interface id="StyleSheets-MediaList" name="MediaList" since="DOM Level 2">
<descr>
<p>
The <code>MediaList</code> interface provides the abstraction of an
ordered collection of <xspecref
href="&html40;/types.html#h-6.13">media</xspecref>,
without defining or constraining how this collection is implemented. An
empty list is the same as a list that contains the medium
<code>"all"</code>.
</p>
<p>
The items in the <code>MediaList</code> are accessible via an integral
index, starting from 0.
</p>
</descr>
<attribute type="DOMString" name="mediaText" id="StyleSheets-MediaList-mediaText">
<descr>
<p>
The parsable textual representation of the media list. This is a
comma-separated list of media.
</p>
</descr>
<setraises>
<exception name="DOMException">
<descr>
<p>SYNTAX_ERR: Raised if the specified string value has a syntax
error and is unparsable.</p>
<p>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is
readonly.</p>
</descr>
</exception>
</setraises>
</attribute>
<attribute id="StyleSheets-MediaList-length" name="length" type="unsigned long" readonly="yes">
<descr>
<p>
The number of media in the list. The range of valid media is
<code>0</code> to <code>length-1</code> inclusive.
</p>
</descr>
</attribute>
<method id="StyleSheets-MediaList-item" name="item">
<descr>
<p>
Returns the <code>index</code>th in the list. If <code>index</code> is
greater than or equal to the number of media in the list, this returns
<code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr>
<p>
Index into the collection.
</p>
</descr>
</param>
</parameters>
<returns type="DOMString">
<descr>
<p>
The medium at the <code>index</code>th position in the
<code>MediaList</code>, or <code>null</code> if that is not a
valid index.
</p>
</descr>
</returns>
<raises>
</raises>
</method>
<method name="deleteMedium" id="StyleSheets-MediaList-deleteMedium">
<descr>
<p>
Deletes the medium indicated by <code>oldMedium</code> from the list.
</p>
</descr>
<parameters>
<param name="oldMedium" type="DOMString" attr="in">
<descr>
<p>The medium to delete in the media list.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p></p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
</p>
<p>
NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not in the list.
</p>
</descr>
</exception>
</raises>
</method>
<method id="StyleSheets-MediaList-appendMedium" name="appendMedium">
<descr>
<p>
Adds the medium <code>newMedium</code> to the end of the list. If the
<code>newMedium</code> is already used, it is first removed.
</p>
</descr>
<parameters>
<param name="newMedium" type="DOMString" attr="in">
<descr>
<p>The new medium to add.</p>
</descr>
</param>
</parameters>
<returns type="void">
<descr>
<p></p>
</descr>
</returns>
<raises>
<exception name="DOMException">
<descr>
<p>
INVALID_CHARACTER_ERR: If the medium contains characters that are
invalid in the underlying style language.
</p>
<p>
NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
</p>
</descr>
</exception>
</raises>
</method>
</interface>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- RGBColor interface -->
<interface id="CSS-RGBColor" name="RGBColor" since="DOM Level 2">
<descr>
<p>
The <code>RGBColor</code> interface is used to represent any <xspecref
href="&css2;/syndata.html#value-def-color">RGB
color</xspecref> value. This interface reflects the values in the
underlying style property. Hence, modifications made to the
<code>CSSPrimitiveValue</code> objects modify the style property.
</p>
<p>
A specified RGB color is not clipped (even if the number is outside the
range 0-255 or 0%-100%). A computed RGB color is clipped depending on the
device.
</p>
<p>
Even if a style sheet can only contain an integer for a color value, the
internal storage of this integer is a float, and this can be used as a
float in the specified or the computed style.
</p>
<p>
A color percentage value can always be converted to a number and vice
versa.
</p>
</descr>
<attribute id="CSS-RGBColor-red" name="red" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the red value of the RGB color.
</p>
</descr>
</attribute>
<attribute id="CSS-RGBColor-green" name="green" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the green value of the RGB color.
</p>
</descr>
</attribute>
<attribute id="CSS-RGBColor-blue" name="blue" type="CSSPrimitiveValue" readonly="yes">
<descr>
<p>
This attribute is used for the blue value of the RGB color.
</p>
</descr>
</attribute>
</interface>
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Rect interface -->
<interface id="CSS-Rect" name="Rect" since="DOM Level 2">
<descr>
<p>
The <code>Rect</code> interface is used to represent any <xspecref
href="&css2;/visufx.html#value-def-shape">rect</xspecref>
value. This interface reflects the values in the underlying style
property. Hence, modifications made to the <code>CSSPrimitiveValue</code>
objects modify the style property.
</p>
</descr>
<attribute id="CSS-Rect-top" name="top" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the top of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-right" name="right" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the right of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-bottom" name="bottom" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the bottom of the rect.
</p>
</descr>
</attribute>
<attribute id="CSS-Rect-left" name="left" type="CSSPrimitiveValue"
readonly="yes">
<descr>
<p>
This attribute is used for the left of the rect.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- StyleSheet interface -->
<interface name="StyleSheet" id="StyleSheets-StyleSheet" since="DOM Level 2">
<descr>
<p>
The <code>StyleSheet</code> interface is the abstract base interface for
any type of style sheet. It represents a single style sheet associated
with a structured document. In HTML, the StyleSheet interface represents
either an external style sheet, included via the HTML
<xspecref href="&html40;/struct/links.html#h-12.3">
LINK</xspecref> element, or an inline
<xspecref href="&html40;/present/styles.html#h-14.2.3">
STYLE</xspecref> element. In XML, this interface represents an external
style sheet, included via a <xspecref href="&xml-stylesheet;">style sheet
processing instruction</xspecref>.
</p>
</descr>
<attribute type="DOMString" readonly="yes" name="type" id="StyleSheets-StyleSheet-type">
<descr>
<p>
This specifies the style sheet language for this style sheet. The style
sheet language is specified as a content type (e.g. "text/css"). The
<xspecref href="&html40;/types.html#type-content-type">content
type</xspecref> is often specified in the <code>ownerNode</code>. Also
see the <xspecref href="&html40;/struct/links.html#adef-type-A">type
attribute definition</xspecref> for the <code>LINK</code> element in
HTML 4.0, and the type pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;">style sheet processing instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="boolean" name="disabled" id="StyleSheets-StyleSheet-disabled">
<descr>
<p>
<code>false</code> if the style sheet is applied to the document.
<code>true</code> if it is not. Modifying this attribute may cause a
new resolution of style for the document. A stylesheet only applies if
both an appropriate medium definition is present and the disabled
attribute is false. So, if the media doesn't apply to the current user
agent, the <code>disabled</code> attribute is ignored.
</p>
</descr>
</attribute>
<attribute type="Node" readonly="yes" name="ownerNode" id="StyleSheets-StyleSheet-ownerNode">
<descr>
<p>
The node that associates this style sheet with the document. For HTML,
this may be the corresponding <code>LINK</code> or <code>STYLE</code>
element. For XML, it may be the linking processing instruction. For
style sheets that are included by other style sheets, the value of this
attribute is <code>null</code>.
</p>
</descr>
</attribute>
<attribute type="StyleSheet" readonly="yes" name="parentStyleSheet" id="StyleSheets-StyleSheet-parentStyleSheet">
<descr>
<p>
For style sheet languages that support the concept of style sheet
inclusion, this attribute represents the including style sheet, if one
exists. If the style sheet is a top-level style sheet, or the style
sheet language does not support inclusion, the value of this attribute
is <code>null</code>.
</p>
</descr>
</attribute>
<attribute type="DOMString" readonly="yes" name="href" id="StyleSheets-StyleSheet-href">
<descr>
<p>
If the style sheet is a linked style sheet, the value of its attribute
is its location. For inline style sheets, the value of this attribute
is <code>null</code>. See the <xspecref
href="&html40;/struct/links.html#adef-href">href
attribute definition</xspecref> for the <code>LINK</code> element in HTML
4.0, and the href pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing
instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="DOMString" readonly="yes" name="title" id="StyleSheets-StyleSheet-title">
<descr>
<p>
The advisory title. The title is often specified in the
<code>ownerNode</code>. See the <xspecref
href="&html40;/struct/global.html#adef-title">title attribute
definition</xspecref> for the <code>LINK</code> element in HTML 4.0,
and the title pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing instruction</xspecref>.
</p>
</descr>
</attribute>
<attribute type="MediaList" readonly="yes" name="media" id="StyleSheets-StyleSheet-media">
<descr>
<p>
The intended destination media for style information. The media is
often specified in the <code>ownerNode</code>. If no media has been
specified, the <code>MediaList</code> will be empty. See the <xspecref
href="&html40;/present/styles.html#adef-media">media
attribute definition</xspecref> for the <code>LINK</code> element in
HTML 4.0, and the media pseudo-attribute for the XML <xspecref
href="&xml-stylesheet;/#The xml-stylesheet processing instruction">style sheet processing
instruction </xspecref>. Modifying the media list may cause a change to
the attribute <code>disabled</code>.
</p>
</descr>
</attribute>
</interface>
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- StyleSheetList interface -->
<interface name="StyleSheetList" id="StyleSheets-StyleSheetList"
since="DOM Level 2">
<descr>
<p>The <code>StyleSheetList</code> interface provides the
abstraction of an ordered collection of style sheets.
</p>
<p>
The items in the <code>StyleSheetList</code> are accessible via an
integral index, starting from 0.
</p>
</descr>
<attribute type="unsigned long" readonly="yes" name="length" id="StyleSheets-StyleSheetList-length">
<descr>
<p>
The number of <code>StyleSheets</code> in the list. The range of valid
child stylesheet indices is <code>0</code> to <code>length-1</code>
inclusive.
</p>
</descr>
</attribute>
<method name="item" id="StyleSheets-StyleSheetList-item">
<descr>
<p>
Used to retrieve a style sheet by ordinal index. If index is greater
than or equal to the number of style sheets in the list, this returns
<code>null</code>.
</p>
</descr>
<parameters>
<param name="index" type="unsigned long" attr="in">
<descr><p>Index into the collection</p></descr>
</param>
</parameters>
<returns type="StyleSheet">
<descr><p>The style sheet at the <code>index</code> position in the
<code>StyleSheetList</code>, or <code>null</code> if
that is not a valid index.
</p></descr>
</returns>
<raises>
<!-- No exceptions -->
</raises>
</method>
</interface>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- ViewCSS interface -->
<interface id="CSS-ViewCSS" name="ViewCSS" inherits="views::AbstractView" since="DOM Level 2">
<descr>
<p>
This interface represents a CSS view. The <code>getComputedStyle</code>
method provides a <b>read only access</b> to the <xspecref
href="&css2;/cascade.html#computed-value">computed values</xspecref> of
an element.
</p>
<p>
The expectation is that an instance of the <code>ViewCSS</code>
interface can be obtained by using binding-specific casting methods on an
instance of the <code>AbstractView</code> interface.
</p>
<p>
Since a computed style is related to an <code>Element</code> node, if
this element is removed from the document, the associated
<code>CSSStyleDeclaration</code> and <code>CSSValue</code> related to
this declaration are no longer valid.
</p>
</descr>
<method id="CSS-CSSview-getComputedStyle" name="getComputedStyle">
<descr>
<p>
This method is used to get the computed style as it is defined in
<bibref ref="CSS2"/>.
</p>
</descr>
<parameters>
<param name="elt" type="Element" attr="in">
<descr>
<p>
The element whose style is to be computed. This parameter cannot
be null.
</p>
</descr>
</param>
<param name="pseudoElt" type="DOMString" attr="in">
<descr>
<p>
The pseudo-element or <code>null</code> if none.
</p>
</descr>
</param>
</parameters>
<returns type="CSSStyleDeclaration">
<descr>
<p>
The computed style. The <code>CSSStyleDeclaration</code> is
read-only and contains only absolute values.
</p>
</descr>
</returns>
<raises>
<!-- No Exception -->
</raises>
</method>
</interface>
+195
View File
@@ -0,0 +1,195 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Style">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Style Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor"> <name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation> </author>
<author role="editor"> <name>Philippe Le H&eacute;garet</name>
<affiliation>W3C, team contact (from November 1999)</affiliation> </author>
<author role="editor"> <name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation> </author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Style Sheets
and Cascading Style Sheets (CSS), a platform- and language-neutral interface
that allows programs and scripts to dynamically access and update the content
and of style sheets documents. The Document Object Model Level 2 Style
builds on the Document Object Model Level 2 Core <bibref ref='DOMCore'/> and on
the Document Object Model Level 2 Views <bibref ref='DOMViews'/>.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
</front>
<body>
&stylesheets;
&css;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for the
Level 2 Document Object Model Style definitions. The
definitions are divided into <loc href="#StyleSheets-IDL">Stylesheets</loc>
and <loc href="#CSS-IDL">CSS</loc>.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<div2 id="StyleSheets-IDL">
<head>Document Object Model Style Sheets</head>
<!--
******************************************************
| STYLESHEETS OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL StyleSheets stylesheets dom.w3c.org dom?>
</div2>
<div2 id="CSS-IDL">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL CSS css dom.w3c.org dom stylesheets views?>
</div2>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java Language <bibref ref='Java'/>
binding for the Level 2 Document Object Model Style. The definitions are
divided into <loc href="#StyleSheets-Java">StyleSheets</loc> and <loc
href="#CSS-Java">CSS</loc>.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<div2 id="StyleSheets-Java">
<head>Document Object Model Style Sheets</head>
<!--
******************************************************
| STYLESHEETS JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA StyleSheets org.w3c.dom stylesheets?>
</div2>
<div2 id="CSS-Java">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA CSS org.w3c.dom css?>
</div2>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Style
definitions. The definitions are divided into
<loc href="#StyleSheets-ECMA">StyleSheets</loc> and
<loc href="#CSS-ECMA">CSS</loc>.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<div2 id="StyleSheets-ECMA">
<head>Document Object Model StyleSheets</head>
<!--
******************************************************
| STYLESHEETS ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA StyleSheets?>
</div2>
<div2 id="CSS-ECMA">
<head>Document Object Model CSS</head>
<!--
******************************************************
| CSS ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA CSS?>
</div2>
</div1>
&contributors;
&references;
&index;
</back>
</spec>
+150
View File
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Date$ $Revision$ -->
<!--
*************************************************************************
* BEGINNING OF LEVEL TWO STYLE SHEETS *
*************************************************************************
-->
<div1 id="StyleSheets">
<head>Document Object Model Style Sheets</head>
<orglist role="editors">
<member>
<name>Chris Wilson</name>
<affiliation>Microsoft Corp.</affiliation>
</member>
<member>
<name>Philippe Le H&eacute;garet</name>
<affiliation>W3C</affiliation>
</member>
<member>
<name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<!--
******************************************************
| INTRODUCTION |
******************************************************
-->
<div2 id="StyleSheets-overview">
<head>Introduction</head>
<p>
The DOM Level 2 Style Sheet interfaces are base interfaces used to
represent any type of style sheet. The expectation is that DOM modules
that represent a specific style sheet language may contain interfaces
that derive from these interfaces.
</p>
<p>
The interfaces found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"StyleSheets" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined
defined in the DOM 2 Core specification <bibref
ref="DOMCore"/>. Please refer to additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance</xspecref>
in the DOM Level 2 Core specification <bibref ref="DOMCore"/>.
</p>
</div2>
<div2 id="StyleSheets-fundamental">
<head>Style Sheet Interfaces</head>
<p>This set of interfaces represents the generic notion of style sheets.</p>
<definitions>
&stylesheets-stylesheet;
&stylesheets-stylesheetlist;
&stylesheets-medialist;
</definitions>
</div2>
<div2 id="StyleSheets-extensions">
<head>Document Extensions</head>
<definitions>
&stylesheets-linkstyle;
&stylesheets-documentstyle;
</definitions>
</div2>
<div2 id="StyleSheets-Association">
<head>Association between a style sheet and a document.</head>
<glist>
<gitem>
<label>HTML and Style Sheet Creation</label>
<def>
<p>
A style sheet can be associated with an HTMLDocument in one of two
ways:
</p>
<ulist>
<item>
<p>
By creating a new LINK HTML element (see the
<code>HTMLLinkElement</code> interface in the <bibref
ref="DOMHTML-inf"/> and <bibref ref="HTML40"/>). The underlying
style sheet will be created after the element is inserted into
the document and both the href and the type attribute have been
set in a way indicating that the linked object is a style
sheet.
</p>
</item>
<item>
<p>
By creating a new STYLE HTML element (see the
<code>HTMLStyleElement</code> interface in the <bibref
ref="DOMHTML-inf"/> and <bibref ref="HTML40"/>). The underlying style
sheet will be created after the element is inserted into the
document and the type attribute is set in a way indicating that
the element corresponds to a style sheet language interpreted
by the user agent.
</p>
</item>
</ulist>
</def>
</gitem>
<gitem>
<label>
HTML and Style Sheet Removal
</label>
<def>
<p>
Removing a LINK HTML element or a STYLE HTML element removes the
underlying style sheet from the style sheet collection associated
with a document. Specifically, the removed style sheet is no longer
applied to the presentation of the document.
</p>
</def>
</gitem>
<gitem>
<label>XML and Style Sheet Creation</label>
<def>
<p>
A new style sheet can be created and associated with an XML
document by creating a processing instruction with the target
'xml-stylesheet' <bibref ref="XML-StyleSheet"/> and inserting it
into the document.
</p>
</def>
</gitem>
<gitem>
<label>XML and Style Sheet Removal</label>
<def>
<p>
Removing a processing instruction with a target of 'xml-stylesheet'
<bibref ref="XML-StyleSheet"/> removes the underlying style sheet
from the style sheet collection associated with a document.
Specifically, the removed style sheet is no longer applied to the
presentation of the document.
</p>
</def>
</gitem>
</glist>
</div2>
</div1>
<!--
*************************************************************************
* END OF LEVEL TWO STYLE SHEETS *
*************************************************************************
-->
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<div1 id="TOC">
<head>Expanded Table of Contents</head>
<?GENERATE-EXPANDED-TOC?>
</div1>
+211
View File
@@ -0,0 +1,211 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Traversal-Range">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Traversal and Range Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor"> <name>Joe Kesselman</name>
<affiliation>IBM</affiliation> </author>
<author role="editor"> <name>Jonathan Robie</name>
<affiliation>Texcel Research and Software AG</affiliation></author>
<author role="editor"> <name>Mike Champion</name>
<affiliation>Arbortext and Software AG</affiliation> </author>
<author role="editor"> <name>Peter Sharpe</name>
<affiliation>SoftQuad Software Inc.</affiliation> </author>
<author role="editor"> <name>Vidur Apparao</name>
<affiliation>Netscape Communications Corp.</affiliation> </author>
<author role="editor"> <name>Lauren Wood</name>
<affiliation>SoftQuad Software Inc., WG Chair</affiliation> </author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Traversal and
Range, platform- and language-neutral interfaces that allow programs and
scripts to dynamically traverse and identify a range of content
in a document. The Document Object Model Level 2 Traversal and Range
build on the Document Object Model Level 2 Core <bibref ref='DOMCore'/>.</p>
<p>The DOM Level 2 Traversal and Range specification is composed of two modules. The
two modules contain specialized interfaces dedicated to traversing the document structure
and identifying and manipulating a range in a document.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
</front>
<body>
&traversal;
&range;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for the
Level 2 Document Object Model Traversal and Range definitions. The
definitions are divided into <loc href="#Traversal-IDL">Traversal</loc>, and
<loc href="#Range-IDL">Range</loc>.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<div2 id="Traversal-IDL">
<head>Document Object Model Traversal</head>
<!--
******************************************************
| TWIF OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL Traversal traversal dom.w3c.org dom?>
</div2>
<div2 id="Range-IDL">
<head>Document Object Model Range</head>
<!--
******************************************************
| RANGE OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL Range ranges dom.w3c.org dom?>
</div2>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java Language <bibref ref='Java'/>
binding for the Level 2 Document Object Model Traversal and Range. The
definitions are divided into <loc href="#Traversal-Java">Traversal</loc>, and
<loc href="#Range-Java">Range</loc>.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<div2 id="Traversal-Java">
<head>Document Object Model Traversal</head>
<!--
******************************************************
| Traversal JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA Traversal org.w3c.dom traversal?>
</div2>
<div2 id="Range-Java">
<head>Document Object Model Range</head>
<!--
******************************************************
| RANGE JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA Range org.w3c.dom ranges?>
</div2>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Traversal
and Range definitions. The definitions are divided into
<loc href="#Traversal-ECMA">Traversal</loc>, and
<loc href="#Range-ECMA">Range</loc>.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<!--
******************************************************
| CORE ECMASCRIPT BINDINGS |
******************************************************
-->
<div2 id="Traversal-ECMA">
<head>Document Object Model Traversal</head>
<!--
******************************************************
| Traversal ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA Traversal?>
</div2>
<div2 id="Range-ECMA">
<head>Document Object Model Range</head>
<!--
******************************************************
| RANGE ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA Range?>
</div2>
</div1>
&contributors;
&glossary;
&references;
&index;
</back>
</spec>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+74
View File
@@ -0,0 +1,74 @@
<!ENTITY eacute "&#233;">
<!ENTITY uuml "&#252;">
<!ENTITY auml "&#228;">
<!ENTITY reg "&#174;">
<!ENTITY copy "&#169;">
<!ENTITY core.prefix "Core">
<!ENTITY html.prefix "HTML">
<!ENTITY views.prefix "Views">
<!ENTITY style.prefix "Style">
<!ENTITY events.prefix "Events">
<!ENTITY traversal-range.prefix "Traversal-Range">
<!-- default prefix is empty -->
<!ENTITY prefix "">
<!-- date of documents -->
<!ENTITY date.day "13">
<!ENTITY date.month "November">
<!ENTITY date.monthnum "11">
<!ENTITY date.year "2000">
<!ENTITY doc.date "&date.year;&date.monthnum;&date.day;">
<!ENTITY dom2.prefix "DOM-Level-2">
<!ENTITY dom.prefix "REC-&dom2.prefix;">
<!ENTITY doc.prefix "&dom.prefix;-&prefix;">
<!-- ***** Use this for internal release
<!ENTITY release "confidential to W3C members and invited experts">
<!ENTITY review "<emph role='important'>DOM IG</emph>">
<!ENTITY to-mail "w3c-dom-ig@w3.org">
<!ENTITY mailarchive "http://lists.w3.org/Archives/Member/w3c-dom-ig/">
<!ENTITY tr.url "http://www.w3.org/DOM/Group/drafts">
<!ENTITY this.url "&tr.url;/&date.year;/&doc.prefix;-&doc.date;">
<!ENTITY pdf.loc "">
<!ENTITY txt.loc "">
<!ENTITY prev.url "http://www.w3.org/DOM/Group/drafts/2000/CR-&dom2.prefix;-&prefix;-200000809/">
<!ENTITY prev.locs "&prev.loc;">
***** -->
<!-- ***** Use this for public release -->
<!ENTITY release "for public review">
<!ENTITY review "public">
<!ENTITY to-mail "www-dom@w3.org">
<!ENTITY mailarchive "http://lists.w3.org/Archives/Public/www-dom/">
<!ENTITY translation.url "http://www.w3.org/2000/11/&dom2.prefix;-translations">
<!ENTITY errata.url "http://www.w3.org/2000/11/&dom2.prefix;-errata">
<!ENTITY tr.url "http://www.w3.org/TR">
<!ENTITY this.url "&tr.url;/&date.year;/&doc.prefix;-&doc.date;">
<!ENTITY pdf.loc "<loc href='&this.url;/DOM2-&prefix;.pdf'>PDF file</loc>">
<!ENTITY txt.loc "<loc href='&this.url;/DOM2-&prefix;.txt'>plain text</loc>">
<!ENTITY prev.url "http://www.w3.org/TR/2000/PR-&dom2.prefix;-&prefix;-20000927">
<!ENTITY prev.locs "&prev.loc;">
<!-- ***** -->
<!ENTITY core.url "&tr.url;/&date.year;/&dom.prefix;-&core.prefix;-&doc.date;">
<!ENTITY html.url "&tr.url;/&date.year;/&dom.prefix;-&html.prefix;-&doc.date;">
<!ENTITY views.url "&tr.url;/&date.year;/&dom.prefix;-&views.prefix;-&doc.date;">
<!ENTITY style.url "&tr.url;/&date.year;/&dom.prefix;-&style.prefix;-&doc.date;">
<!ENTITY events.url "&tr.url;/&date.year;/&dom.prefix;-&events.prefix;-&doc.date;">
<!ENTITY traversal-range.url "&tr.url;/&date.year;/&dom.prefix;-&traversal-range.prefix;-&doc.date;">
<!ENTITY latest.url "&tr.url;/&dom2.prefix;-&prefix;">
<!ENTITY core.latest.url "&tr.url;/&dom2.prefix;-&core.prefix;">
<!ENTITY html.latest.url "&tr.url;/&dom2.prefix;-&html.prefix;">
<!ENTITY views.latest.url "&tr.url;/&dom2.prefix;-&views.prefix;">
<!ENTITY style.latest.url "&tr.url;/&dom2.prefix;-&style.prefix;">
<!ENTITY events.latest.url "&tr.url;/&dom2.prefix;-&events.prefix;">
<!ENTITY traversal-range.latest.url "&tr.url;/&dom2.prefix;-&traversal-range.prefix;">
<!ENTITY zip.loc "<loc href='&this.url;/DOM2-&prefix;.zip'>ZIP file</loc>">
<!ENTITY ps.loc "<loc href='&this.url;/DOM2-&prefix;.ps'>PostScript file</loc>">
<!ENTITY prev.loc "<loc href='&prev.url;'>&prev.url;</loc>">
+150
View File
@@ -0,0 +1,150 @@
<?xml version="1.0" ?>
<!-- $Id$ -->
<!DOCTYPE spec PUBLIC
"-//W3C//DTD Specification V2.1-Based DOM//EN"
"../../../pubtext/xmlspec-v21-dom.dtd" [
<!ENTITY prefix "Views">
<!ENTITY % version SYSTEM "../version.xml">
%version;
<!ENTITY % links SYSTEM "../link-entities.xml">
%links;
<!ENTITY % parts SYSTEM "../part-entities.xml">
%parts;
<!ENTITY options SYSTEM "../options.xml">
]>
<spec>
<!--
*************************************************************************
* FRONT MATTER *
*************************************************************************
-->
&options;
<header>
<title>Document Object Model (DOM) Level 2 Views Specification</title>
<version>1.0</version> <w3c-designation>&doc.prefix;-&doc.date;
</w3c-designation> <w3c-doctype>W3C Recommendation</w3c-doctype> <pubdate>
<day>&date.day;</day> <month>&date.month;</month> <year>&date.year;</year>
</pubdate>
<publoc> <loc href="&this.url;">&this.url;</loc>
&ps.loc;
&pdf.loc;
&txt.loc;
&zip.loc;
</publoc>
<latestloc> <loc href="&latest.url;">&latest.url;</loc> </latestloc>
<prevlocs>
&prev.locs;
</prevlocs>
<authlist>
<author role="editor"> <name>Arnaud Le Hors</name>
<affiliation>W3C team contact until October 1999, then IBM</affiliation>
</author>
<author role="editor"> <name>Laurence Cable</name>
<affiliation>Sun Microsystems</affiliation> </author>
</authlist>
<!--
******************************************************
* DOCUMENT ABSTRACT *
******************************************************
-->
<abstract id="id-abstract">
<p>This specification defines the Document Object Model Level 2 Views, a platform-
and language-neutral interface that allows programs and scripts to dynamically
access and update the content of a representation of a document. The Document
Object Model Level 2 Views builds on the Document Object Model Level 2 Core
<bibref ref='DOMCore'/>.</p>
</abstract>
&status;
<sourcedesc>
<p>Created in electronic form.</p>
</sourcedesc>
<langusage>
<language id="en">English</language>
</langusage>
<revisiondesc>
<p>$Revision$</p>
</revisiondesc>
<?GENERATE-TOC?>
</header>
<front>
&toc;
&copyright;
</front>
<body>
&views;
</body>
<!--
*************************************************************************
* BACK MATTER *
*************************************************************************
-->
<back>
<div1 role="idl" id="idl">
<head>IDL Definitions</head>
<p>This appendix contains the complete OMG IDL <bibref ref='OMGIDL'/> for
the Level 2 Document Object Model Views definitions.</p>
<p>The IDL files are also available as: <loc
href="idl.zip">&this.url;/idl.zip</loc></p>
<!--
******************************************************
| Views OMG IDL DEFINITIONS |
******************************************************
-->
<?GENERATE-IDL Views views dom.w3c.org dom?>
</div1>
<div1 role="java-binding" id="java-binding">
<head>Java Language Binding</head>
<p>This appendix contains the complete Java Language <bibref ref='Java'/>
binding for the Level 2 Document Object Model Views.</p>
<p>The Java files are also available as <loc
href="java-binding.zip">&this.url;/java-binding.zip</loc></p>
<!--
******************************************************
| Views JAVA BINDINGS |
******************************************************
-->
<?GENERATE-JAVA Views org.w3c.dom views?>
</div1>
<div1 role="ecma-binding" id="ecma-binding">
<head>ECMAScript Language Binding</head>
<p>This appendix contains the complete ECMAScript <bibref
ref='ECMAScript'/> binding for the Level 2 Document Object Model Views
definitions.</p>
<note>
<p>
Exceptions handling is only supported by ECMAScript implementation
conformant with the Standard ECMA-262 3rd. Edition (<bibref
ref="ECMAScript"/>).
</p>
</note>
<!--
******************************************************
| Views ECMASCRIPT BINDINGS |
******************************************************
-->
<?GENERATE-ECMA Views?>
</div1>
&contributors;
&references;
&index;
</back>
</spec>
+107
View File
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<div1 id="Views">
<head>Document Object Model Views</head>
<orglist role="editors">
<member>
<name>Arnaud Le Hors</name>
<affiliation>IBM</affiliation>
</member>
<member>
<name>Laurence Cable</name>
<affiliation>Sun Microsystems</affiliation>
</member>
</orglist>
<?GENERATE-MINI-TOC?>
<div2 id='Views-intro'>
<head>Introduction</head>
<p>A document may have one or more "views" associated with it, e.g., a
computed view on a document after applying a CSS stylesheet, or multiple
presentations (e.g., HTML Frame) of the same document in a client. That is,
a view is some alternate representation of, or a presentation of, and
associated with, a source document.</p>
<p>A view may be static, reflecting the state of the document when
the view was created, or dynamic, reflecting changes in the target
document as they occur, subsequent to the view being created. This
Level of the DOM specification makes no statement about these behaviors.</p>
<p>This section defines an <code>AbstractView</code> interface which
provides a base interface from which all such views shall derive. It
defines an attribute which references the target document of the
<code>AbstractView</code>. The only semantics of the <code>AbstractView</code>
defined here create an association between a view and its target document.</p>
<p>There are no subinterfaces of <code>AbstractView</code> defined in the DOM
Level 2.</p>
<p>However, <code>AbstractView</code> is defined in and used in this Level
in two places:</p>
<ulist>
<item><p>A Document may implement a <code>DocumentView</code> that has a default view
attribute associated with it. This default view is typically dependent on
the implementation (e.g., the browser frame rendering the document). The
default view can be used in order to identify and/or associate a view with
its target document (by testing object equality on the
<code>AbstractView</code> or obtaining the <code>DocumentView</code>
attribute).</p></item>
<item><p>A <code>UIEvent</code> typically occurs upon a view of a Document
(e.g., a mouse click on a browser frame rendering a particular Document
instance). A <code>UIEvent</code> has an <code>AbstractView</code>
associated with it which identifies both the particular
(implementation-dependent) view in which the event occurs, and
the target document the <code>UIEvent</code> is related to.</p></item></ulist>
<p>
The interfaces found within this section are not mandatory. A DOM
application may use the <code>hasFeature(feature, version)</code> method
of the <code>DOMImplementation</code> interface with parameter values
"Views" and "2.0" (respectively) to determine whether or not this module
is supported by the implementation. In order to fully support this
module, an implementation must also support the "Core" feature defined
defined in the Document Object Model Level 2 Core specification <bibref
ref="DOMCore"/>. Please refer to additional information about <xspecref
href='&core.latest.url;/introduction.html#ID-Conformance'>conformance in
the DOM Level 2 Core specification</xspecref>.
</p>
</div2>
<div2 id='Views-Interfaces'>
<head>Interfaces</head>
<definitions>
<interface name="AbstractView" id="Views-AbstractView"
since="DOM Level 2">
<descr>
<p>A base interface that all views shall derive from.</p>
</descr>
<attribute id="Views-AbstractView-document" type="DocumentView" name="document" readonly="yes">
<descr>
<p>The source <code>DocumentView</code> of which this is an
<code>AbstractView</code>.</p>
</descr>
</attribute>
</interface>
<interface name="DocumentView" id="Views-DocumentView"
since="DOM Level 2">
<descr>
<p>The <code>DocumentView</code> interface is implemented by
<code>Document</code> objects in DOM implementations supporting DOM
Views. It provides an attribute to retrieve the default view of a
document.</p>
</descr>
<attribute id="Views-DocumentView-defaultView" type="AbstractView" name="defaultView" readonly="yes">
<descr>
<p>The default <code>AbstractView</code> for this
<code>Document</code>, or <code>null</code> if none
available.</p>
</descr>
</attribute>
</interface>
</definitions>
</div2>
</div1>