[llvm-commits] [llvm-gcc-4.2] r43913 [17/80] - in /llvm-gcc-4.2/trunk: boehm-gc/ boehm-gc/Mac_files/ boehm-gc/cord/ boehm-gc/doc/ boehm-gc/include/ boehm-gc/include/private/ boehm-gc/tests/ libffi/ libffi/include/ libffi/src/ libffi/src/alpha/ libffi/src/arm/ libffi/src/cris/ libffi/src/frv/ libffi/src/ia64/ libffi/src/m32r/ libffi/src/m68k/ libffi/src/mips/ libffi/src/pa/ libffi/src/powerpc/ libffi/src/s390/ libffi/src/sh/ libffi/src/sh64/ libffi/src/sparc/ libffi/src/x86/ libffi/testsuite/ libffi/testsuite/config/ li...

Bill Wendling isanbard at gmail.com
Thu Nov 8 14:57:11 PST 2007


Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * This interface represents a known entity, either parsed or unparsed, in an 
+ * XML document. Note that this models the entity itself <em>not</em> the entity declaration.
+ * <p>The <code>nodeName</code> attribute that is inherited from 
+ * <code>Node</code> contains the name of the entity.
+ * <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>XML does not mandate that a non-validating XML processor read and 
+ * process entity declarations made in the external subset or declared in 
+ * 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 text of the entity may not be available. When the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#intern-replacement'>
+ * replacement text</a> is available, the corresponding <code>Entity</code> node's child list 
+ * represents the structure of that replacement value. Otherwise, the child 
+ * list is empty.
+ * <p>DOM Level 3 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 descendants are readonly.
+ * <p>An <code>Entity</code> node does not have any parent.
+ * <p ><b>Note:</b> If the entity contains an unbound namespace prefix, 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.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface Entity extends Node {
+    /**
+     * The public identifier associated with the entity if specified, and 
+     * <code>null</code> otherwise.
+     */
+    public String getPublicId();
+
+    /**
+     * The system identifier associated with the entity if specified, and 
+     * <code>null</code> otherwise. This may be an absolute URI or not.
+     */
+    public String getSystemId();
+
+    /**
+     * For unparsed entities, the name of the notation for the entity. For 
+     * parsed entities, this is <code>null</code>.
+     */
+    public String getNotationName();
+
+    /**
+     * An attribute specifying the encoding used for this entity at the time 
+     * of parsing, when it is an external parsed entity. This is 
+     * <code>null</code> if it an entity from the internal subset or if it 
+     * is not known.
+     * @since DOM Level 3
+     */
+    public String getInputEncoding();
+
+    /**
+     * An attribute specifying, as part of the text declaration, the encoding 
+     * of this entity, when it is an external parsed entity. This is 
+     * <code>null</code> otherwise.
+     * @since DOM Level 3
+     */
+    public String getXmlEncoding();
+
+    /**
+     * An attribute specifying, as part of the text declaration, the version 
+     * number of this entity, when it is an external parsed entity. This is 
+     * <code>null</code> otherwise.
+     * @since DOM Level 3
+     */
+    public String getXmlVersion();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * <code>EntityReference</code> nodes may be used to represent an entity 
+ * reference in the tree. 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 
+ * <code>Document</code>, instead of providing <code>EntityReference</code> 
+ * nodes. If it does provide such nodes, then for an 
+ * <code>EntityReference</code> node that represents a reference to a known 
+ * entity an <code>Entity</code> exists, and the subtree of the 
+ * <code>EntityReference</code> node is a copy of the <code>Entity</code> 
+ * node subtree. However, the latter may not be true when an entity contains 
+ * an unbound namespace prefix. In such a case, because the namespace prefix 
+ * resolution depends on where the entity reference is, the descendants of 
+ * the <code>EntityReference</code> node may be bound to different namespace 
+ * URIs. When an <code>EntityReference</code> node represents a reference to 
+ * an unknown entity, the node has no children and its replacement value, 
+ * when used by <code>Attr.value</code> for example, is empty.
+ * <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and 
+ * all their descendants are readonly.
+ * <p ><b>Note:</b> <code>EntityReference</code> nodes may cause element 
+ * content and attribute value normalization problems when, such as in XML 
+ * 1.0 and XML Schema, the normalization is performed after entity reference 
+ * are expanded.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface EntityReference extends Node {
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ *  The <code>NameList</code> interface provides the abstraction of an ordered 
+ * collection of parallel pairs of name and namespace values (which could be 
+ * null values), without defining or constraining how this collection is 
+ * implemented. The items in the <code>NameList</code> are accessible via an 
+ * integral index, starting from 0. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
+ */
+public interface NameList {
+    /**
+     *  Returns the <code>index</code>th name item in the collection. 
+     * @param index Index into the collection.
+     * @return  The name at the <code>index</code>th position in the 
+     *   <code>NameList</code>, or <code>null</code> if there is no name for 
+     *   the specified index or if the index is out of range. 
+     */
+    public String getName(int index);
+
+    /**
+     *  Returns the <code>index</code>th namespaceURI item in the collection. 
+     * @param index Index into the collection.
+     * @return  The namespace URI at the <code>index</code>th position in the 
+     *   <code>NameList</code>, or <code>null</code> if there is no name for 
+     *   the specified index or if the index is out of range. 
+     */
+    public String getNamespaceURI(int index);
+
+    /**
+     *  The number of pairs (name and namespaceURI) in the list. The range of 
+     * valid child node indices is 0 to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  Test if a name is part of this <code>NameList</code>. 
+     * @param str  The name to look for. 
+     * @return  <code>true</code> if the name has been found, 
+     *   <code>false</code> otherwise. 
+     */
+    public boolean contains(String str);
+
+    /**
+     *  Test if the pair namespaceURI/name is part of this 
+     * <code>NameList</code>. 
+     * @param namespaceURI  The namespace URI to look for. 
+     * @param name  The name to look for. 
+     * @return  <code>true</code> if the pair namespaceURI/name has been 
+     *   found, <code>false</code> otherwise. 
+     */
+    public boolean containsNS(String namespaceURI, 
+                              String name);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * 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><code>NamedNodeMap</code> objects in the DOM are live.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface NamedNodeMap {
+    /**
+     * Retrieves a node specified by name.
+     * @param name The <code>nodeName</code> of a node to retrieve.
+     * @return 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.
+     */
+    public Node getNamedItem(String name);
+
+    /**
+     * 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. Replacing a node by itself has no effect.
+     * <br>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.
+     * @param arg A node to store in this map. The node will later be 
+     *   accessible using the value of its <code>nodeName</code> attribute.
+     * @return If the new <code>Node</code> replaces an existing node the 
+     *   replaced <code>Node</code> is returned, otherwise <code>null</code> 
+     *   is returned.
+     * @exception DOMException
+     *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
+     *   different document than the one that created this map.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+     *   <br>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.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node 
+     *   doesn't belong in this NamedNodeMap. Examples would include trying 
+     *   to insert something other than an Attr node into an Element's map 
+     *   of attributes, or a non-Entity node into the DocumentType's map of 
+     *   Entities.
+     */
+    public Node setNamedItem(Node arg)
+                             throws DOMException;
+
+    /**
+     * 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.
+     * @param name The <code>nodeName</code> of the node to remove.
+     * @return The node removed from this map if a node with such a name 
+     *   exists.
+     * @exception DOMException
+     *   NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in 
+     *   this map.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+     */
+    public Node removeNamedItem(String name)
+                                throws DOMException;
+
+    /**
+     * 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>.
+     * @param index Index into this map.
+     * @return The node at the <code>index</code>th position in the map, or 
+     *   <code>null</code> if that is not a valid index.
+     */
+    public Node item(int index);
+
+    /**
+     * The number of nodes in this map. The range of valid child node indices 
+     * is <code>0</code> to <code>length-1</code> inclusive.
+     */
+    public int getLength();
+
+    /**
+     * Retrieves a node specified by local name and namespace URI.
+     * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     * , applications must use the value null as the namespaceURI parameter 
+     * for methods if they wish to have no namespace.
+     * @param namespaceURI The namespace URI of the node to retrieve.
+     * @param localName The local name of the node to retrieve.
+     * @return 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.
+     * @exception DOMException
+     *   NOT_SUPPORTED_ERR: May be raised if the implementation does not 
+     *   support the feature "XML" and the language exposed through the 
+     *   Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]). 
+     * @since DOM Level 2
+     */
+    public Node getNamedItemNS(String namespaceURI, 
+                               String localName)
+                               throws DOMException;
+
+    /**
+     * 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. Replacing a node by itself has no effect.
+     * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     * , applications must use the value null as the namespaceURI parameter 
+     * for methods if they wish to have no namespace.
+     * @param arg 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.
+     * @return If the new <code>Node</code> replaces an existing node the 
+     *   replaced <code>Node</code> is returned, otherwise <code>null</code> 
+     *   is returned.
+     * @exception DOMException
+     *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
+     *   different document than the one that created this map.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+     *   <br>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.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node 
+     *   doesn't belong in this NamedNodeMap. Examples would include trying 
+     *   to insert something other than an Attr node into an Element's map 
+     *   of attributes, or a non-Entity node into the DocumentType's map of 
+     *   Entities.
+     *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not 
+     *   support the feature "XML" and the language exposed through the 
+     *   Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]). 
+     * @since DOM Level 2
+     */
+    public Node setNamedItemNS(Node arg)
+                               throws DOMException;
+
+    /**
+     * 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.
+     * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     * , applications must use the value null as the namespaceURI parameter 
+     * for methods if they wish to have no namespace.
+     * @param namespaceURI The namespace URI of the node to remove.
+     * @param localName The local name of the node to remove.
+     * @return The node removed from this map if a node with such a local 
+     *   name and namespace URI exists.
+     * @exception DOMException
+     *   NOT_FOUND_ERR: Raised if there is no node with the specified 
+     *   <code>namespaceURI</code> and <code>localName</code> in this map.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+     *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not 
+     *   support the feature "XML" and the language exposed through the 
+     *   Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]). 
+     * @since DOM Level 2
+     */
+    public Node removeNamedItemNS(String namespaceURI, 
+                                  String localName)
+                                  throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,900 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * 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>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>The values of <code>nodeName</code>, 
+ * <code>nodeValue</code>, and <code>attributes</code> vary according to the 
+ * node type as follows: 
+ * <table border='1' cellpadding='3'>
+ * <tr>
+ * <th>Interface</th>
+ * <th>nodeName</th>
+ * <th>nodeValue</th>
+ * <th>attributes</th>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>Attr</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>Attr.name</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as 
+ * <code>Attr.value</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>CDATASection</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>"#cdata-section"</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the 
+ * content of the CDATA Section</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>Comment</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>"#comment"</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the 
+ * content of the comment</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>Document</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>"#document"</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>DocumentFragment</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>"#document-fragment"</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>DocumentType</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as 
+ * <code>DocumentType.name</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>Element</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>Element.tagName</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>NamedNodeMap</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>Entity</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>entity name</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>EntityReference</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>Notation</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>notation name</td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>null</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>ProcessingInstruction</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same 
+ * as <code>ProcessingInstruction.target</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as 
+ * <code>ProcessingInstruction.data</code></td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * <tr>
+ * <td valign='top' rowspan='1' colspan='1'><code>Text</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>
+ * <code>"#text"</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the content 
+ * of the text node</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
+ * </tr>
+ * </table> 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface Node {
+    // NodeType
+    /**
+     * The node is an <code>Element</code>.
+     */
+    public static final short ELEMENT_NODE              = 1;
+    /**
+     * The node is an <code>Attr</code>.
+     */
+    public static final short ATTRIBUTE_NODE            = 2;
+    /**
+     * The node is a <code>Text</code> node.
+     */
+    public static final short TEXT_NODE                 = 3;
+    /**
+     * The node is a <code>CDATASection</code>.
+     */
+    public static final short CDATA_SECTION_NODE        = 4;
+    /**
+     * The node is an <code>EntityReference</code>.
+     */
+    public static final short ENTITY_REFERENCE_NODE     = 5;
+    /**
+     * The node is an <code>Entity</code>.
+     */
+    public static final short ENTITY_NODE               = 6;
+    /**
+     * The node is a <code>ProcessingInstruction</code>.
+     */
+    public static final short PROCESSING_INSTRUCTION_NODE = 7;
+    /**
+     * The node is a <code>Comment</code>.
+     */
+    public static final short COMMENT_NODE              = 8;
+    /**
+     * The node is a <code>Document</code>.
+     */
+    public static final short DOCUMENT_NODE             = 9;
+    /**
+     * The node is a <code>DocumentType</code>.
+     */
+    public static final short DOCUMENT_TYPE_NODE        = 10;
+    /**
+     * The node is a <code>DocumentFragment</code>.
+     */
+    public static final short DOCUMENT_FRAGMENT_NODE    = 11;
+    /**
+     * The node is a <code>Notation</code>.
+     */
+    public static final short NOTATION_NODE             = 12;
+
+    /**
+     * The name of this node, depending on its type; see the table above.
+     */
+    public String getNodeName();
+
+    /**
+     * 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, 
+     * including if the node is read-only.
+     * @exception DOMException
+     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
+     *   fit in a <code>DOMString</code> variable on the implementation 
+     *   platform.
+     */
+    public String getNodeValue()
+                              throws DOMException;
+    /**
+     * 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, 
+     * including if the node is read-only.
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if 
+     *   it is not defined to be <code>null</code>.
+     */
+    public void setNodeValue(String nodeValue)
+                              throws DOMException;
+
+    /**
+     * A code representing the type of the underlying object, as defined above.
+     */
+    public short getNodeType();
+
+    /**
+     * The parent 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>. 
+     */
+    public Node getParentNode();
+
+    /**
+     * 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.
+     */
+    public NodeList getChildNodes();
+
+    /**
+     * The first child of this node. If there is no such node, this returns 
+     * <code>null</code>.
+     */
+    public Node getFirstChild();
+
+    /**
+     * The last child of this node. If there is no such node, this returns 
+     * <code>null</code>.
+     */
+    public Node getLastChild();
+
+    /**
+     * The node immediately preceding this node. If there is no such node, 
+     * this returns <code>null</code>.
+     */
+    public Node getPreviousSibling();
+
+    /**
+     * The node immediately following this node. If there is no such node, 
+     * this returns <code>null</code>.
+     */
+    public Node getNextSibling();
+
+    /**
+     * A <code>NamedNodeMap</code> containing the attributes of this node (if 
+     * it is an <code>Element</code>) or <code>null</code> otherwise.
+     */
+    public NamedNodeMap getAttributes();
+
+    /**
+     * 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>.
+     * @version DOM Level 2
+     */
+    public Document getOwnerDocument();
+
+    /**
+     * 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.
+     * <br>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 ><b>Note:</b>  Inserting a node before itself is implementation 
+     * dependent. 
+     * @param newChild The node to insert.
+     * @param refChild The reference node, i.e., the node before which the 
+     *   new node must be inserted.
+     * @return The node being inserted.
+     * @exception DOMException
+     *   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 ancestors or this node 
+     *   itself, or if this node is of type <code>Document</code> and the 
+     *   DOM application attempts to insert a second 
+     *   <code>DocumentType</code> or <code>Element</code> node.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
+     *   from a different document than the one that created this node.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or 
+     *   if the parent of the node being inserted is readonly.
+     *   <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of 
+     *   this node.
+     *   <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>, 
+     *   this exception might be raised if the DOM implementation doesn't 
+     *   support the insertion of a <code>DocumentType</code> or 
+     *   <code>Element</code> node.
+     * @version DOM Level 3
+     */
+    public Node insertBefore(Node newChild, 
+                             Node refChild)
+                             throws DOMException;
+
+    /**
+     * Replaces the child node <code>oldChild</code> with <code>newChild</code>
+     *  in the list of children, and returns the <code>oldChild</code> node.
+     * <br>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 ><b>Note:</b>  Replacing a node with itself is implementation 
+     * dependent. 
+     * @param newChild The new node to put in the child list.
+     * @param oldChild The node being replaced in the list.
+     * @return The node replaced.
+     * @exception DOMException
+     *   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 ancestors or this node 
+     *   itself, or if this node is of type <code>Document</code> and the 
+     *   result of the replacement operation would add a second 
+     *   <code>DocumentType</code> or <code>Element</code> on the 
+     *   <code>Document</code> node.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
+     *   from a different document than the one that created this node.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of 
+     *   the new node is readonly.
+     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
+     *   this node.
+     *   <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>, 
+     *   this exception might be raised if the DOM implementation doesn't 
+     *   support the replacement of the <code>DocumentType</code> child or 
+     *   <code>Element</code> child.
+     * @version DOM Level 3
+     */
+    public Node replaceChild(Node newChild, 
+                             Node oldChild)
+                             throws DOMException;
+
+    /**
+     * Removes the child node indicated by <code>oldChild</code> from the list 
+     * of children, and returns it.
+     * @param oldChild The node being removed.
+     * @return The node removed.
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+     *   <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of 
+     *   this node.
+     *   <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>, 
+     *   this exception might be raised if the DOM implementation doesn't 
+     *   support the removal of the <code>DocumentType</code> child or the 
+     *   <code>Element</code> child.
+     * @version DOM Level 3
+     */
+    public Node removeChild(Node oldChild)
+                            throws DOMException;
+
+    /**
+     * 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.
+     * @param newChild The node to add.If it is a 
+     *   <code>DocumentFragment</code> object, the entire contents of the 
+     *   document fragment are moved into the child list of this node
+     * @return The node added.
+     * @exception DOMException
+     *   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 ancestors or this node 
+     *   itself, or if this node is of type <code>Document</code> and the 
+     *   DOM application attempts to append a second 
+     *   <code>DocumentType</code> or <code>Element</code> node.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created 
+     *   from a different document than the one that created this node.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or 
+     *   if the previous parent of the node being inserted is readonly.
+     *   <br>NOT_SUPPORTED_ERR: if the <code>newChild</code> node is a child 
+     *   of the <code>Document</code> node, this exception might be raised 
+     *   if the DOM implementation doesn't support the removal of the 
+     *   <code>DocumentType</code> child or <code>Element</code> child.
+     * @version DOM Level 3
+     */
+    public Node appendChild(Node newChild)
+                            throws DOMException;
+
+    /**
+     * Returns whether this node has any children.
+     * @return Returns <code>true</code> if this node has any children, 
+     *   <code>false</code> otherwise.
+     */
+    public boolean hasChildNodes();
+
+    /**
+     * 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>) and no user data. User 
+     * data associated to the imported node is not carried over. However, if 
+     * any <code>UserDataHandlers</code> has been specified along with the 
+     * associated data these handlers will be called with the appropriate 
+     * parameters before this method returns.
+     * <br>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 children it 
+     * contains unless it is a deep clone. This includes text contained in 
+     * an the <code>Element</code> since the text is contained in a child 
+     * <code>Text</code> node. Cloning an <code>Attr</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 an <code>Attr</code> always clones its 
+     * children, since they represent its value, no matter whether this is a 
+     * deep clone or not. Cloning an <code>EntityReference</code> 
+     * automatically constructs its subtree if a corresponding 
+     * <code>Entity</code> is available, no matter whether this is a deep 
+     * clone or not. Cloning any other type of node simply returns a copy of 
+     * this node.
+     * <br>Note that cloning an immutable subtree results in a mutable copy, 
+     * but the children of an <code>EntityReference</code> clone are readonly
+     * . 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.
+     * @param deep 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>).
+     * @return The duplicate node.
+     */
+    public Node cloneNode(boolean deep);
+
+    /**
+     *  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 [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
+     *  lookups) that depend on a particular document tree structure are to 
+     * be used. If the parameter "normalize-characters" of the 
+     * <code>DOMConfiguration</code> object attached to the 
+     * <code>Node.ownerDocument</code> is <code>true</code>, this method 
+     * will also fully normalize the characters of the <code>Text</code> 
+     * nodes. 
+     * <p ><b>Note:</b> 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.
+     * @version DOM Level 3
+     */
+    public void normalize();
+
+    /**
+     *  Tests whether the DOM implementation implements a specific feature and 
+     * that feature is supported by this node, as specified in . 
+     * @param feature  The name of the feature to test. 
+     * @param version  This is the version number of the feature to test. 
+     * @return Returns <code>true</code> if the specified feature is 
+     *   supported on this node, <code>false</code> otherwise.
+     * @since DOM Level 2
+     */
+    public boolean isSupported(String feature, 
+                               String version);
+
+    /**
+     * The namespace URI of this node, or <code>null</code> if it is 
+     * unspecified (see ).
+     * <br>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.
+     * <br>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>Document.createElement()</code>, this is always 
+     * <code>null</code>.
+     * <p ><b>Note:</b> Per the <em>Namespaces in XML</em> Specification [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     *  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.
+     * @since DOM Level 2
+     */
+    public String getNamespaceURI();
+
+    /**
+     * The namespace prefix of this node, or <code>null</code> if it is 
+     * unspecified. When it is defined to be <code>null</code>, setting it 
+     * has no effect, including if the node is read-only.
+     * <br>Note that setting this attribute, when permitted, changes the 
+     * <code>nodeName</code> attribute, which holds the qualified name, as 
+     * well as the <code>tagName</code> and <code>name</code> attributes of 
+     * the <code>Element</code> and <code>Attr</code> interfaces, when 
+     * applicable.
+     * <br>Setting the prefix to <code>null</code> makes it unspecified, 
+     * setting it to an empty string is implementation dependent.
+     * <br>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.
+     * <br>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>.
+     * @since DOM Level 2
+     */
+    public String getPrefix();
+    /**
+     * The namespace prefix of this node, or <code>null</code> if it is 
+     * unspecified. When it is defined to be <code>null</code>, setting it 
+     * has no effect, including if the node is read-only.
+     * <br>Note that setting this attribute, when permitted, changes the 
+     * <code>nodeName</code> attribute, which holds the qualified name, as 
+     * well as the <code>tagName</code> and <code>name</code> attributes of 
+     * the <code>Element</code> and <code>Attr</code> interfaces, when 
+     * applicable.
+     * <br>Setting the prefix to <code>null</code> makes it unspecified, 
+     * setting it to an empty string is implementation dependent.
+     * <br>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.
+     * <br>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>.
+     * @exception DOMException
+     *   INVALID_CHARACTER_ERR: Raised if the specified prefix contains an 
+     *   illegal character according to the XML version in use specified in 
+     *   the <code>Document.xmlVersion</code> attribute.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is 
+     *   malformed per the Namespaces in XML specification, 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 "<a href='http://www.w3.org/XML/1998/namespace'>
+     *   http://www.w3.org/XML/1998/namespace</a>", if this node is an attribute and the specified prefix is "xmlns" and 
+     *   the <code>namespaceURI</code> of this node is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if this node is an attribute and the <code>qualifiedName</code> of 
+     *   this node is "xmlns" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     *   .
+     * @since DOM Level 2
+     */
+    public void setPrefix(String prefix)
+                               throws DOMException;
+
+    /**
+     * Returns the local part of the qualified name of this node.
+     * <br>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>Document.createElement()</code>, this is always 
+     * <code>null</code>.
+     * @since DOM Level 2
+     */
+    public String getLocalName();
+
+    /**
+     * Returns whether this node (if it is an element) has any attributes.
+     * @return Returns <code>true</code> if this node has any attributes, 
+     *   <code>false</code> otherwise.
+     * @since DOM Level 2
+     */
+    public boolean hasAttributes();
+
+    /**
+     * The absolute base URI of this node or <code>null</code> if the 
+     * implementation wasn't able to obtain an absolute URI. This value is 
+     * computed as described in . However, when the <code>Document</code> 
+     * supports the feature "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+     * , the base URI is computed using first the value of the href 
+     * attribute of the HTML BASE element if any, and the value of the 
+     * <code>documentURI</code> attribute from the <code>Document</code> 
+     * interface otherwise.
+     * @since DOM Level 3
+     */
+    public String getBaseURI();
+
+    // DocumentPosition
+    /**
+     * The two nodes are disconnected. Order between disconnected nodes is 
+     * always implementation-specific.
+     */
+    public static final short DOCUMENT_POSITION_DISCONNECTED = 0x01;
+    /**
+     * The second node precedes the reference node.
+     */
+    public static final short DOCUMENT_POSITION_PRECEDING = 0x02;
+    /**
+     * The node follows the reference node.
+     */
+    public static final short DOCUMENT_POSITION_FOLLOWING = 0x04;
+    /**
+     * The node contains the reference node. A node which contains is always 
+     * preceding, too.
+     */
+    public static final short DOCUMENT_POSITION_CONTAINS = 0x08;
+    /**
+     * The node is contained by the reference node. A node which is contained 
+     * is always following, too.
+     */
+    public static final short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+    /**
+     * The determination of preceding versus following is 
+     * implementation-specific.
+     */
+    public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
+
+    /**
+     * Compares the reference node, i.e. the node on which this method is 
+     * being called, with a node, i.e. the one passed as a parameter, with 
+     * regard to their position in the document and according to the 
+     * document order.
+     * @param other The node to compare against the reference node.
+     * @return Returns how the node is positioned relatively to the reference 
+     *   node.
+     * @exception DOMException
+     *   NOT_SUPPORTED_ERR: when the compared nodes are from different DOM 
+     *   implementations that do not coordinate to return consistent 
+     *   implementation-specific results.
+     * @since DOM Level 3
+     */
+    public short compareDocumentPosition(Node other)
+                                         throws DOMException;
+
+    /**
+     * This attribute returns the text content of this node and its 
+     * descendants. When it is defined to be <code>null</code>, setting it 
+     * has no effect. On setting, any possible children this node may have 
+     * are removed and, if it the new string is not empty or 
+     * <code>null</code>, replaced by a single <code>Text</code> node 
+     * containing the string this attribute is set to. 
+     * <br> On getting, no serialization is performed, the returned string 
+     * does not contain any markup. No whitespace normalization is performed 
+     * and the returned string does not contain the white spaces in element 
+     * content (see the attribute 
+     * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, 
+     * no parsing is performed either, the input string is taken as pure 
+     * textual content. 
+     * <br>The string returned is made of the text content of this node 
+     * depending on its type, as defined below: 
+     * <table border='1' cellpadding='3'>
+     * <tr>
+     * <th>Node type</th>
+     * <th>Content</th>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>
+     * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, 
+     * DOCUMENT_FRAGMENT_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> 
+     * attribute value of every child node, excluding COMMENT_NODE and 
+     * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the 
+     * node has no children.</td>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, 
+     * PROCESSING_INSTRUCTION_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, 
+     * DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
+     * </tr>
+     * </table>
+     * @exception DOMException
+     *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than 
+     *   fit in a <code>DOMString</code> variable on the implementation 
+     *   platform.
+     * @since DOM Level 3
+     */
+    public String getTextContent()
+                                         throws DOMException;
+    /**
+     * This attribute returns the text content of this node and its 
+     * descendants. When it is defined to be <code>null</code>, setting it 
+     * has no effect. On setting, any possible children this node may have 
+     * are removed and, if it the new string is not empty or 
+     * <code>null</code>, replaced by a single <code>Text</code> node 
+     * containing the string this attribute is set to. 
+     * <br> On getting, no serialization is performed, the returned string 
+     * does not contain any markup. No whitespace normalization is performed 
+     * and the returned string does not contain the white spaces in element 
+     * content (see the attribute 
+     * <code>Text.isElementContentWhitespace</code>). Similarly, on setting, 
+     * no parsing is performed either, the input string is taken as pure 
+     * textual content. 
+     * <br>The string returned is made of the text content of this node 
+     * depending on its type, as defined below: 
+     * <table border='1' cellpadding='3'>
+     * <tr>
+     * <th>Node type</th>
+     * <th>Content</th>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>
+     * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, 
+     * DOCUMENT_FRAGMENT_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> 
+     * attribute value of every child node, excluding COMMENT_NODE and 
+     * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the 
+     * node has no children.</td>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, 
+     * PROCESSING_INSTRUCTION_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
+     * </tr>
+     * <tr>
+     * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, 
+     * DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
+     * <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
+     * </tr>
+     * </table>
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+     * @since DOM Level 3
+     */
+    public void setTextContent(String textContent)
+                                         throws DOMException;
+
+    /**
+     * Returns whether this node is the same node as the given one.
+     * <br>This method provides a way to determine whether two 
+     * <code>Node</code> references returned by the implementation reference 
+     * the same object. When two <code>Node</code> references are references 
+     * to the same object, even if through a proxy, the references may be 
+     * used completely interchangeably, such that all attributes have the 
+     * same values and calling the same DOM method on either reference 
+     * always has exactly the same effect.
+     * @param other The node to test against.
+     * @return Returns <code>true</code> if the nodes are the same, 
+     *   <code>false</code> otherwise.
+     * @since DOM Level 3
+     */
+    public boolean isSameNode(Node other);
+
+    /**
+     * Look up the prefix associated to the given namespace URI, starting from 
+     * this node. The default namespace declarations are ignored by this 
+     * method.
+     * <br>See  for details on the algorithm used by this method.
+     * @param namespaceURI The namespace URI to look for.
+     * @return Returns an associated namespace prefix if found or 
+     *   <code>null</code> if none is found. If more than one prefix are 
+     *   associated to the namespace prefix, the returned namespace prefix 
+     *   is implementation dependent.
+     * @since DOM Level 3
+     */
+    public String lookupPrefix(String namespaceURI);
+
+    /**
+     *  This method checks if the specified <code>namespaceURI</code> is the 
+     * default namespace or not. 
+     * @param namespaceURI The namespace URI to look for.
+     * @return Returns <code>true</code> if the specified 
+     *   <code>namespaceURI</code> is the default namespace, 
+     *   <code>false</code> otherwise. 
+     * @since DOM Level 3
+     */
+    public boolean isDefaultNamespace(String namespaceURI);
+
+    /**
+     * Look up the namespace URI associated to the given prefix, starting from 
+     * this node.
+     * <br>See  for details on the algorithm used by this method.
+     * @param prefix The prefix to look for. If this parameter is 
+     *   <code>null</code>, the method will return the default namespace URI 
+     *   if any.
+     * @return Returns the associated namespace URI or <code>null</code> if 
+     *   none is found.
+     * @since DOM Level 3
+     */
+    public String lookupNamespaceURI(String prefix);
+
+    /**
+     * Tests whether two nodes are equal.
+     * <br>This method tests for equality of nodes, not sameness (i.e., 
+     * whether the two nodes are references to the same object) which can be 
+     * tested with <code>Node.isSameNode()</code>. All nodes that are the 
+     * same will also be equal, though the reverse may not be true.
+     * <br>Two nodes are equal if and only if the following conditions are 
+     * satisfied: 
+     * <ul>
+     * <li>The two nodes are of the same type.
+     * </li>
+     * <li>The following string 
+     * attributes are equal: <code>nodeName</code>, <code>localName</code>, 
+     * <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
+     * . This is: they are both <code>null</code>, or they have the same 
+     * length and are character for character identical.
+     * </li>
+     * <li>The 
+     * <code>attributes</code> <code>NamedNodeMaps</code> are equal. This 
+     * is: they are both <code>null</code>, or they have the same length and 
+     * for each node that exists in one map there is a node that exists in 
+     * the other map and is equal, although not necessarily at the same 
+     * index.
+     * </li>
+     * <li>The <code>childNodes</code> <code>NodeLists</code> are equal. 
+     * This is: they are both <code>null</code>, or they have the same 
+     * length and contain equal nodes at the same index. Note that 
+     * normalization can affect equality; to avoid this, nodes should be 
+     * normalized before being compared.
+     * </li>
+     * </ul> 
+     * <br>For two <code>DocumentType</code> nodes to be equal, the following 
+     * conditions must also be satisfied: 
+     * <ul>
+     * <li>The following string attributes 
+     * are equal: <code>publicId</code>, <code>systemId</code>, 
+     * <code>internalSubset</code>.
+     * </li>
+     * <li>The <code>entities</code> 
+     * <code>NamedNodeMaps</code> are equal.
+     * </li>
+     * <li>The <code>notations</code> 
+     * <code>NamedNodeMaps</code> are equal.
+     * </li>
+     * </ul> 
+     * <br>On the other hand, the following do not affect equality: the 
+     * <code>ownerDocument</code>, <code>baseURI</code>, and 
+     * <code>parentNode</code> attributes, the <code>specified</code> 
+     * attribute for <code>Attr</code> nodes, the <code>schemaTypeInfo</code>
+     *  attribute for <code>Attr</code> and <code>Element</code> nodes, the 
+     * <code>Text.isElementContentWhitespace</code> attribute for 
+     * <code>Text</code> nodes, as well as any user data or event listeners 
+     * registered on the nodes. 
+     * <p ><b>Note:</b>  As a general rule, anything not mentioned in the 
+     * description above is not significant in consideration of equality 
+     * checking. Note that future versions of this specification may take 
+     * into account more attributes and implementations conform to this 
+     * specification are expected to be updated accordingly. 
+     * @param arg The node to compare equality with.
+     * @return Returns <code>true</code> if the nodes are equal, 
+     *   <code>false</code> otherwise.
+     * @since DOM Level 3
+     */
+    public boolean isEqualNode(Node arg);
+
+    /**
+     *  This method returns a specialized object which implements the 
+     * specialized APIs of the specified feature and version, as specified 
+     * in . The specialized object may also be obtained by using 
+     * binding-specific casting methods but is not necessarily expected to, 
+     * as discussed in . This method also allow the implementation to 
+     * provide specialized objects which do not support the <code>Node</code>
+     *  interface. 
+     * @param feature  The name of the feature requested. Note that any plus 
+     *   sign "+" prepended to the name of the feature will be ignored since 
+     *   it is not significant in the context of this method. 
+     * @param version  This is the version number of the feature to test. 
+     * @return  Returns an object which implements the specialized APIs of 
+     *   the specified feature and version, if any, or <code>null</code> if 
+     *   there is no object which implements interfaces associated with that 
+     *   feature. If the <code>DOMObject</code> returned by this method 
+     *   implements the <code>Node</code> interface, it must delegate to the 
+     *   primary core <code>Node</code> and not return results inconsistent 
+     *   with the primary core <code>Node</code> such as attributes, 
+     *   childNodes, etc. 
+     * @since DOM Level 3
+     */
+    public Object getFeature(String feature, 
+                             String version);
+
+    /**
+     * Associate an object to a key on this node. The object can later be 
+     * retrieved from this node by calling <code>getUserData</code> with the 
+     * same key.
+     * @param key The key to associate the object to.
+     * @param data The object to associate to the given key, or 
+     *   <code>null</code> to remove any existing association to that key.
+     * @param handler The handler to associate to that key, or 
+     *   <code>null</code>.
+     * @return Returns the <code>DOMUserData</code> previously associated to 
+     *   the given key on this node, or <code>null</code> if there was none.
+     * @since DOM Level 3
+     */
+    public Object setUserData(String key, 
+                              Object data, 
+                              UserDataHandler handler);
+
+    /**
+     * Retrieves the object associated to a key on a this node. The object 
+     * must first have been set to this node by calling 
+     * <code>setUserData</code> with the same key.
+     * @param key The key the object is associated to.
+     * @return Returns the <code>DOMUserData</code> associated to the given 
+     *   key on this node, or <code>null</code> if there was none.
+     * @since DOM Level 3
+     */
+    public Object getUserData(String key);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * 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 live.
+ * <p>The items in the <code>NodeList</code> are accessible via an integral 
+ * index, starting from 0.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface NodeList {
+    /**
+     * 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>.
+     * @param index Index into the collection.
+     * @return 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.
+     */
+    public Node item(int index);
+
+    /**
+     * The number of nodes in the list. The range of valid child node indices 
+     * is 0 to <code>length-1</code> inclusive.
+     */
+    public int getLength();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * This interface represents a notation declared in the DTD. A notation either 
+ * declares, by name, the format of an unparsed entity (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#Notations'>section 4.7</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), or is 
+ * used for formal declaration of processing instruction targets (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-pi'>section 2.6</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]). The 
+ * <code>nodeName</code> attribute inherited from <code>Node</code> is set 
+ * to the declared name of the notation.
+ * <p>The DOM Core does not support editing <code>Notation</code> nodes; they 
+ * are therefore readonly.
+ * <p>A <code>Notation</code> node does not have any parent.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface Notation extends Node {
+    /**
+     * The public identifier of this notation. If the public identifier was 
+     * not specified, this is <code>null</code>.
+     */
+    public String getPublicId();
+
+    /**
+     * The system identifier of this notation. If the system identifier was 
+     * not specified, this is <code>null</code>. This may be an absolute URI 
+     * or not.
+     */
+    public String getSystemId();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * The <code>ProcessingInstruction</code> interface represents a "processing 
+ * instruction", used in XML as a way to keep processor-specific information 
+ * in the text of the document.
+ * <p> No lexical check is done on the content of a processing instruction and 
+ * it is therefore possible to have the character sequence 
+ * <code>"?>"</code> in the content, which is illegal a processing 
+ * instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The 
+ * presence of this character sequence must generate a fatal error during 
+ * serialization. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface ProcessingInstruction extends Node {
+    /**
+     * The target of this processing instruction. XML defines this as being 
+     * the first token following the markup that begins the processing 
+     * instruction.
+     */
+    public String getTarget();
+
+    /**
+     * 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>?></code>.
+     */
+    public String getData();
+    /**
+     * 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>?></code>.
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+     */
+    public void setData(String data)
+                                   throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * The <code>Text</code> interface inherits from <code>CharacterData</code> 
+ * and represents the textual content (termed <a href='http://www.w3.org/TR/2004/REC-xml-20040204#syntax'>character data</a> 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 
+ * information items (elements, comments, etc.) and <code>Text</code> nodes 
+ * that form the list of children of the element.
+ * <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>Node.normalize()</code> method merges any such adjacent 
+ * <code>Text</code> objects into a single node for each block of text.
+ * <p> No lexical check is done on the content of a <code>Text</code> node 
+ * and, depending on its position in the document, some characters must be 
+ * escaped during serialization using character references; e.g. the 
+ * characters "<&" if the textual content is part of an element or of 
+ * an attribute, the character sequence "]]>" when part of an element, 
+ * the quotation mark character " or the apostrophe character ' when part of 
+ * an attribute. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ */
+public interface Text extends CharacterData {
+    /**
+     * Breaks this node into two nodes at the specified <code>offset</code>, 
+     * keeping both in the tree as siblings. 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 sibling 
+     * of the original node. When the <code>offset</code> is equal to the 
+     * length of this node, the new node has no data.
+     * @param offset The 16-bit unit offset at which to split, starting from 
+     *   <code>0</code>.
+     * @return The new node, of the same type as this node.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified offset is negative or greater 
+     *   than the number of 16-bit units in <code>data</code>.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+     */
+    public Text splitText(int offset)
+                          throws DOMException;
+
+    /**
+     * Returns whether this text node contains <a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204#infoitem.character'>
+     * element content whitespace</a>, often abusively called "ignorable whitespace". The text node is 
+     * determined to contain whitespace in element content during the load 
+     * of the document or if validation occurs while using 
+     * <code>Document.normalizeDocument()</code>.
+     * @since DOM Level 3
+     */
+    public boolean isElementContentWhitespace();
+
+    /**
+     * Returns all text of <code>Text</code> nodes logically-adjacent text 
+     * nodes to this node, concatenated in document order.
+     * <br>For instance, in the example below <code>wholeText</code> on the 
+     * <code>Text</code> node that contains "bar" returns "barfoo", while on 
+     * the <code>Text</code> node that contains "foo" it returns "barfoo". 
+     * @since DOM Level 3
+     */
+    public String getWholeText();
+
+    /**
+     * Replaces the text of the current node and all logically-adjacent text 
+     * nodes with the specified text. All logically-adjacent text nodes are 
+     * removed including the current node unless it was the recipient of the 
+     * replacement text.
+     * <br>This method returns the node which received the replacement text. 
+     * The returned node is: 
+     * <ul>
+     * <li><code>null</code>, when the replacement text is 
+     * the empty string;
+     * </li>
+     * <li>the current node, except when the current node is 
+     * read-only;
+     * </li>
+     * <li> a new <code>Text</code> node of the same type (
+     * <code>Text</code> or <code>CDATASection</code>) as the current node 
+     * inserted at the location of the replacement.
+     * </li>
+     * </ul>
+     * <br>For instance, in the above example calling 
+     * <code>replaceWholeText</code> on the <code>Text</code> node that 
+     * contains "bar" with "yo" in argument results in the following: 
+     * <br>Where the nodes to be removed are read-only descendants of an 
+     * <code>EntityReference</code>, the <code>EntityReference</code> must 
+     * be removed instead of the read-only nodes. If any 
+     * <code>EntityReference</code> to be removed has descendants that are 
+     * not <code>EntityReference</code>, <code>Text</code>, or 
+     * <code>CDATASection</code> nodes, the <code>replaceWholeText</code> 
+     * method must fail before performing any modification of the document, 
+     * raising a <code>DOMException</code> with the code 
+     * <code>NO_MODIFICATION_ALLOWED_ERR</code>.
+     * <br>For instance, in the example below calling 
+     * <code>replaceWholeText</code> on the <code>Text</code> node that 
+     * contains "bar" fails, because the <code>EntityReference</code> node 
+     * "ent" contains an <code>Element</code> node which cannot be removed.
+     * @param content The content of the replacing <code>Text</code> node.
+     * @return The <code>Text</code> node created with the specified content.
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if one of the <code>Text</code> 
+     *   nodes being replaced is readonly.
+     * @since DOM Level 3
+     */
+    public Text replaceWholeText(String content)
+                                 throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ *  The <code>TypeInfo</code> interface represents a type referenced from 
+ * <code>Element</code> or <code>Attr</code> nodes, specified in the schemas 
+ * associated with the document. The type is a pair of a namespace URI and 
+ * name properties, and depends on the document's schema. 
+ * <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], the values 
+ * are computed as follows: 
+ * <ul>
+ * <li> If this type is referenced from an 
+ * <code>Attr</code> node, <code>typeNamespace</code> is 
+ * <code>"http://www.w3.org/TR/REC-xml"</code> and <code>typeName</code> 
+ * represents the <b>[attribute type]</b> property in the [<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
+ * . If there is no declaration for the attribute, <code>typeNamespace</code>
+ *  and <code>typeName</code> are <code>null</code>. 
+ * </li>
+ * <li> If this type is 
+ * referenced from an <code>Element</code> node, <code>typeNamespace</code> 
+ * and <code>typeName</code> are <code>null</code>. 
+ * </li>
+ * </ul>
+ * <p> If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+ * , the values are computed as follows using the post-schema-validation 
+ * infoset contributions (also called PSVI contributions): 
+ * <ul>
+ * <li> If the <b>[validity]</b> property exists AND is <em>"invalid"</em> or <em>"notKnown"</em>: the {target namespace} and {name} properties of the declared type if 
+ * available, otherwise <code>null</code>. 
+ * <p ><b>Note:</b>  At the time of writing, the XML Schema specification does 
+ * not require exposing the declared type. Thus, DOM implementations might 
+ * choose not to provide type information if validity is not valid. 
+ * </li>
+ * <li> If the <b>[validity]</b> property exists and is <em>"valid"</em>: 
+ * <ol>
+ * <li> If <b>[member type definition]</b> exists: 
+ * <ol>
+ * <li>If {name} is not absent, then expose {name} and {target 
+ * namespace} properties of the <b>[member type definition]</b> property;
+ * </li>
+ * <li>Otherwise, expose the namespace and local name of the 
+ * corresponding anonymous type name.
+ * </li>
+ * </ol>
+ * </li>
+ * <li> If the <b>[type definition]</b> property exists: 
+ * <ol>
+ * <li>If {name} is not absent, then expose {name} and {target 
+ * namespace} properties of the <b>[type definition]</b> property;
+ * </li>
+ * <li>Otherwise, expose the namespace and local name of the 
+ * corresponding anonymous type name.
+ * </li>
+ * </ol> 
+ * </li>
+ * <li> If the <b>[member type definition anonymous]</b> exists: 
+ * <ol>
+ * <li>If it is false, then expose <b>[member type definition name]</b> and <b>[member type definition namespace]</b> properties;
+ * </li>
+ * <li>Otherwise, expose the namespace and local name of the 
+ * corresponding anonymous type name.
+ * </li>
+ * </ol> 
+ * </li>
+ * <li> If the <b>[type definition anonymous]</b> exists: 
+ * <ol>
+ * <li>If it is false, then expose <b>[type definition name]</b> and <b>[type definition namespace]</b> properties;
+ * </li>
+ * <li>Otherwise, expose the namespace and local name of the 
+ * corresponding anonymous type name.
+ * </li>
+ * </ol> 
+ * </li>
+ * </ol>
+ * </li>
+ * </ul>
+ * <p ><b>Note:</b>  Other schema languages are outside the scope of the W3C 
+ * and therefore should define how to represent their type systems using 
+ * <code>TypeInfo</code>. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
+ */
+public interface TypeInfo {
+    /**
+     *  The name of a type declared for the associated element or attribute, 
+     * or <code>null</code> if unknown. 
+     */
+    public String getTypeName();
+
+    /**
+     *  The namespace of the type declared for the associated element or 
+     * attribute or <code>null</code> if the element does not have 
+     * declaration or if no namespace information is available. 
+     */
+    public String getTypeNamespace();
+
+    // DerivationMethods
+    /**
+     *  If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     * , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeRestriction'>
+     * restriction</a> if complex types are involved, or a <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-restriction'>
+     * restriction</a> if simple types are involved. 
+     * <br>  The reference type definition is derived by restriction from the 
+     * other type definition if the other type definition is the same as the 
+     * reference type definition, or if the other type definition can be 
+     * reached recursively following the {base type definition} property 
+     * from the reference type definition, and all the <em>derivation methods</em> involved are restriction. 
+     */
+    public static final int DERIVATION_RESTRICTION    = 0x00000001;
+    /**
+     *  If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     * , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeExtension'>
+     * extension</a>. 
+     * <br>  The reference type definition is derived by extension from the 
+     * other type definition if the other type definition can be reached 
+     * recursively following the {base type definition} property from the 
+     * reference type definition, and at least one of the <em>derivation methods</em> involved is an extension. 
+     */
+    public static final int DERIVATION_EXTENSION      = 0x00000002;
+    /**
+     *  If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     * , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-union'>
+     * union</a> if simple types are involved. 
+     * <br> The reference type definition is derived by union from the other 
+     * type definition if there exists two type definitions T1 and T2 such 
+     * as the reference type definition is derived from T1 by 
+     * <code>DERIVATION_RESTRICTION</code> or 
+     * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type 
+     * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>union</em>, and one of the {member type definitions} is T2. Note that T1 could be 
+     * the same as the reference type definition, and T2 could be the same 
+     * as the other type definition. 
+     */
+    public static final int DERIVATION_UNION          = 0x00000004;
+    /**
+     *  If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     * , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-list'>list</a>. 
+     * <br> The reference type definition is derived by list from the other 
+     * type definition if there exists two type definitions T1 and T2 such 
+     * as the reference type definition is derived from T1 by 
+     * <code>DERIVATION_RESTRICTION</code> or 
+     * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type 
+     * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>list</em>, and T2 is the {item type definition}. Note that T1 could be the same as 
+     * the reference type definition, and T2 could be the same as the other 
+     * type definition. 
+     */
+    public static final int DERIVATION_LIST           = 0x00000008;
+
+    /**
+     *  This method returns if there is a derivation between the reference 
+     * type definition, i.e. the <code>TypeInfo</code> on which the method 
+     * is being called, and the other type definition, i.e. the one passed 
+     * as parameters. 
+     * @param typeNamespaceArg  the namespace of the other type definition. 
+     * @param typeNameArg  the name of the other type definition. 
+     * @param derivationMethod  the type of derivation and conditions applied 
+     *   between two types, as described in the list of constants provided 
+     *   in this interface. 
+     * @return  If the document's schema is a DTD or no schema is associated 
+     *   with the document, this method will always return <code>false</code>
+     *   .  If the document's schema is an XML Schema, the method will 
+     *   <code>true</code> if the reference type definition is derived from 
+     *   the other type definition according to the derivation parameter. If 
+     *   the value of the parameter is <code>0</code> (no bit is set to 
+     *   <code>1</code> for the <code>derivationMethod</code> parameter), 
+     *   the method will return <code>true</code> if the other type 
+     *   definition can be reached by recursing any combination of {base 
+     *   type definition}, {item type definition}, or {member type 
+     *   definitions} from the reference type definition. 
+     */
+    public boolean isDerivedFrom(String typeNamespaceArg, 
+                                 String typeNameArg, 
+                                 int derivationMethod);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom;
+
+/**
+ * When associating an object to a key on a node using 
+ * <code>Node.setUserData()</code> the application can provide a handler 
+ * that gets called when the node the object is associated to is being 
+ * cloned, imported, or renamed. This can be used by the application to 
+ * implement various behaviors regarding the data it associates to the DOM 
+ * nodes. This interface defines that handler. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
+ */
+public interface UserDataHandler {
+    // OperationType
+    /**
+     * The node is cloned, using <code>Node.cloneNode()</code>.
+     */
+    public static final short NODE_CLONED               = 1;
+    /**
+     * The node is imported, using <code>Document.importNode()</code>.
+     */
+    public static final short NODE_IMPORTED             = 2;
+    /**
+     * The node is deleted.
+     * <p ><b>Note:</b> This may not be supported or may not be reliable in 
+     * certain environments, such as Java, where the implementation has no 
+     * real control over when objects are actually deleted.
+     */
+    public static final short NODE_DELETED              = 3;
+    /**
+     * The node is renamed, using <code>Document.renameNode()</code>.
+     */
+    public static final short NODE_RENAMED              = 4;
+    /**
+     * The node is adopted, using <code>Document.adoptNode()</code>.
+     */
+    public static final short NODE_ADOPTED              = 5;
+
+    /**
+     * This method is called whenever the node for which this handler is 
+     * registered is imported or cloned.
+     * <br> DOM applications must not raise exceptions in a 
+     * <code>UserDataHandler</code>. The effect of throwing exceptions from 
+     * the handler is DOM implementation dependent. 
+     * @param operation Specifies the type of operation that is being 
+     *   performed on the node.
+     * @param key Specifies the key for which this handler is being called. 
+     * @param data Specifies the data for which this handler is being called. 
+     * @param src Specifies the node being cloned, adopted, imported, or 
+     *   renamed. This is <code>null</code> when the node is being deleted.
+     * @param dst Specifies the node newly created if any, or 
+     *   <code>null</code>.
+     */
+    public void handle(short operation, 
+                       String key, 
+                       Object data, 
+                       Node src, 
+                       Node dst);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+
+package org.w3c.dom.bootstrap;
+
+import java.util.StringTokenizer;
+import java.util.Vector;
+import org.w3c.dom.DOMImplementationSource;
+import org.w3c.dom.DOMImplementationList;
+import org.w3c.dom.DOMImplementation;
+import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * A factory that enables applications to obtain instances of
+ * <code>DOMImplementation</code>.
+ *
+ * <p>
+ * Example:
+ * </p>
+ *
+ * <pre class='example'>
+ *  // get an instance of the DOMImplementation registry
+ *  DOMImplementationRegistry registry =
+ *       DOMImplementationRegistry.newInstance();
+ *  // get a DOM implementation the Level 3 XML module
+ *  DOMImplementation domImpl =
+ *       registry.getDOMImplementation("XML 3.0");
+ * </pre>
+ *
+ * <p>
+ * This provides an application with an implementation-independent starting
+ * point. DOM implementations may modify this class to meet new security
+ * standards or to provide *additional* fallbacks for the list of
+ * DOMImplementationSources.
+ * </p>
+ *
+ * @see DOMImplementation
+ * @see DOMImplementationSource
+ * @since DOM Level 3
+ */
+public final class DOMImplementationRegistry {
+    /**
+     * The system property to specify the
+     * DOMImplementationSource class names.
+     */
+    public static final String PROPERTY =
+	"org.w3c.dom.DOMImplementationSourceList";
+    
+    /**
+     * Default columns per line.
+     */
+    private static final int DEFAULT_LINE_LENGTH = 80;
+    
+    /**
+     * The list of DOMImplementationSources.
+     */
+    private Vector sources;
+    
+    /**
+     * Private constructor.
+     * @param srcs Vector List of DOMImplementationSources
+     */
+    private DOMImplementationRegistry(final Vector srcs) {
+	sources = srcs;
+    }
+    
+    /**
+     * Obtain a new instance of a <code>DOMImplementationRegistry</code>.
+     *
+
+     * The <code>DOMImplementationRegistry</code> is initialized by the
+     * application or the implementation, depending on the context, by
+     * first checking the value of the Java system property
+     * <code>org.w3c.dom.DOMImplementationSourceList</code> and
+     * the the service provider whose contents are at
+     * "<code>META_INF/services/org.w3c.dom.DOMImplementationSourceList</code>"
+     * The value of this property is a white-space separated list of
+     * names of availables classes implementing the
+     * <code>DOMImplementationSource</code> interface. Each class listed
+     * in the class name list is instantiated and any exceptions
+     * encountered are thrown to the application.
+     *
+     * @return an initialized instance of DOMImplementationRegistry
+     * @throws ClassNotFoundException
+     *     If any specified class can not be found
+     * @throws InstantiationException
+     *     If any specified class is an interface or abstract class
+     * @throws IllegalAccessException
+     *     If the default constructor of a specified class is not accessible
+     * @throws ClassCastException
+     *     If any specified class does not implement
+     * <code>DOMImplementationSource</code>
+     */
+    public static DOMImplementationRegistry newInstance()
+	throws
+	ClassNotFoundException,
+	InstantiationException,
+	IllegalAccessException,
+	ClassCastException {
+	Vector sources = new Vector();
+	
+	ClassLoader classLoader = getClassLoader();
+	// fetch system property:
+	String p = getSystemProperty(PROPERTY);
+	
+	//
+	// if property is not specified then use contents of
+        // META_INF/org.w3c.dom.DOMImplementationSourceList from classpath
+	if (p == null) {
+	    p = getServiceValue(classLoader);
+	} 
+        if (p == null) {
+	    //
+	    // DOM Implementations can modify here to add *additional* fallback
+	    // mechanisms to access a list of default DOMImplementationSources.
+	    p = "gnu.xml.dom.ImplementationSource";
+	}
+	if (p != null) {
+	    StringTokenizer st = new StringTokenizer(p);
+	    while (st.hasMoreTokens()) {
+		String sourceName = st.nextToken();
+		// Use context class loader, falling back to Class.forName
+		// if and only if this fails...
+		Class sourceClass = null;
+		if (classLoader != null) {
+		    sourceClass = classLoader.loadClass(sourceName);
+		} else {
+		    sourceClass = Class.forName(sourceName);
+		}
+		DOMImplementationSource source =
+		    (DOMImplementationSource) sourceClass.newInstance();
+		sources.addElement(source);
+	    }
+	}
+	return new DOMImplementationRegistry(sources);
+    }
+    
+    /**
+     * Return the first implementation that has the desired
+     * features, or <code>null</code> if none is found.
+     *
+     * @param features
+     *            A string that specifies which features are required. This is
+     *            a space separated list in which each feature is specified by
+     *            its name optionally followed by a space and a version number.
+     *            This is something like: "XML 1.0 Traversal +Events 2.0"
+     * @return An implementation that has the desired features,
+     *         or <code>null</code> if none found.
+     */
+    public DOMImplementation getDOMImplementation(final String features) {
+	int size = sources.size();
+	String name = null;
+	for (int i = 0; i < size; i++) {
+	    DOMImplementationSource source =
+		(DOMImplementationSource) sources.elementAt(i);
+	    DOMImplementation impl = source.getDOMImplementation(features);
+	    if (impl != null) {
+		return impl;
+	    }
+	}
+	return null;
+    }
+    
+    /**
+     * Return a list of implementations that support the
+     * desired features.
+     *
+     * @param features
+     *            A string that specifies which features are required. This is
+     *            a space separated list in which each feature is specified by
+     *            its name optionally followed by a space and a version number.
+     *            This is something like: "XML 1.0 Traversal +Events 2.0"
+     * @return A list of DOMImplementations that support the desired features.
+     */
+    public DOMImplementationList getDOMImplementationList(final String features) {
+	final Vector implementations = new Vector();
+	int size = sources.size();
+	for (int i = 0; i < size; i++) {
+	    DOMImplementationSource source =
+		(DOMImplementationSource) sources.elementAt(i);
+	    DOMImplementationList impls =
+		source.getDOMImplementationList(features);
+	    for (int j = 0; j < impls.getLength(); j++) {
+		DOMImplementation impl = impls.item(j);
+		implementations.addElement(impl);
+	    }
+	}
+	return new DOMImplementationList() {
+		public DOMImplementation item(final int index) {
+		    if (index >= 0 && index < implementations.size()) {
+			try {
+			    return (DOMImplementation)
+				implementations.elementAt(index);
+			} catch (ArrayIndexOutOfBoundsException e) {
+			    return null;
+			}
+		    }
+		    return null;
+		}
+		
+		public int getLength() {
+		    return implementations.size();
+		}
+	    };
+    }
+    
+    /**
+     * Register an implementation.
+     *
+     * @param s The source to be registered, may not be <code>null</code>
+     */
+    public void addSource(final DOMImplementationSource s) {
+	if (s == null) {
+	    throw new NullPointerException();
+	}
+	if (!sources.contains(s)) {
+	    sources.addElement(s);
+	}
+    }
+    
+    /**
+     *
+     * Gets a class loader.
+     *
+     * @return A class loader, possibly <code>null</code>
+     */
+    private static ClassLoader getClassLoader() {
+	try {
+	    ClassLoader contextClassLoader = getContextClassLoader();
+	    
+	    if (contextClassLoader != null) {
+		return contextClassLoader;
+	    }
+	} catch (Exception e) {
+	    // Assume that the DOM application is in a JRE 1.1, use the
+	    // current ClassLoader
+	    return DOMImplementationRegistry.class.getClassLoader();
+	}
+	return DOMImplementationRegistry.class.getClassLoader();
+    }
+    
+    /**
+     * This method attempts to return the first line of the resource
+     * META_INF/services/org.w3c.dom.DOMImplementationSourceList
+     * from the provided ClassLoader.
+     *
+     * @param classLoader classLoader, may not be <code>null</code>.
+     * @return first line of resource, or <code>null</code>
+     */
+    private static String getServiceValue(final ClassLoader classLoader) {
+	String serviceId = "META-INF/services/" + PROPERTY;
+	// try to find services in CLASSPATH
+	try {
+	    InputStream is = getResourceAsStream(classLoader, serviceId);
+	    
+	    if (is != null) {
+		BufferedReader rd;
+		try {
+		    rd =
+			new BufferedReader(new InputStreamReader(is, "UTF-8"),
+					   DEFAULT_LINE_LENGTH);
+		} catch (java.io.UnsupportedEncodingException e) {
+		    rd =
+			new BufferedReader(new InputStreamReader(is),
+					   DEFAULT_LINE_LENGTH);
+		}		
+		String serviceValue = rd.readLine();
+		rd.close();
+		if (serviceValue != null && serviceValue.length() > 0) {
+		    return serviceValue;
+		}
+	    }
+	} catch (Exception ex) {
+	    return null;
+	}
+	return null;
+    }
+    
+    /**
+     * A simple JRE (Java Runtime Environment) 1.1 test
+     *
+     * @return <code>true</code> if JRE 1.1 
+     */
+    private static boolean isJRE11() {
+	try {
+	    Class c = Class.forName("java.security.AccessController");
+	    // java.security.AccessController existed since 1.2 so, if no
+	    // exception was thrown, the DOM application is running in a JRE
+	    // 1.2 or higher
+	    return false;
+	} catch (Exception ex) {
+	    // ignore 
+	}
+	return true;
+    }
+    
+    /**
+     * This method returns the ContextClassLoader or <code>null</code> if
+     * running in a JRE 1.1
+     *
+     * @return The Context Classloader
+     */
+    private static ClassLoader getContextClassLoader() {
+	return isJRE11()
+	    ? null
+	    : (ClassLoader)
+ 	      AccessController.doPrivileged(new PrivilegedAction() {
+		    public Object run() {
+			ClassLoader classLoader = null;
+			try {
+			    classLoader =
+				Thread.currentThread().getContextClassLoader();
+			} catch (SecurityException ex) {
+			}
+			return classLoader;
+		    }
+		});
+    }
+    
+    /**
+     * This method returns the system property indicated by the specified name
+     * after checking access control privileges. For a JRE 1.1, this check is
+     * not done.
+     * 	 
+     * @param name the name of the system property	 
+     * @return the system property
+     */
+    private static String getSystemProperty(final String name) {
+	return isJRE11()
+	    ? (String) System.getProperty(name)
+	    : (String) AccessController.doPrivileged(new PrivilegedAction() {
+		    public Object run() {
+			return System.getProperty(name);
+		    }
+		});
+    }
+    
+    /**
+     * This method returns an Inputstream for the reading resource
+     * META_INF/services/org.w3c.dom.DOMImplementationSourceList after checking
+     * access control privileges. For a JRE 1.1, this check is not done.
+     *
+     * @param classLoader classLoader	 
+     * @param name the resource 	 
+     * @return an Inputstream for the resource specified
+     */
+    private static InputStream getResourceAsStream(final ClassLoader classLoader,
+						   final String name) {
+	if (isJRE11()) {
+	    InputStream ris;
+	    if (classLoader == null) {
+		ris = ClassLoader.getSystemResourceAsStream(name);
+	    } else {
+		ris = classLoader.getResourceAsStream(name);
+	    }    
+	    return ris;
+	} else {
+	    return (InputStream)
+		AccessController.doPrivileged(new PrivilegedAction() {
+			public Object run() {
+			    InputStream ris;
+			    if (classLoader == null) {
+				ris =
+				    ClassLoader.getSystemResourceAsStream(name);
+			    } else {
+				ris = classLoader.getResourceAsStream(name);
+			    }
+			    return ris;
+			}
+		    });
+	}
+    }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1777 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSS2Properties</code> interface represents a convenience 
+ * mechanism for retrieving and setting properties within a 
+ * <code>CSSStyleDeclaration</code>. The attributes of this interface 
+ * correspond to all the properties specified in CSS2. Getting an attribute 
+ * of this interface is equivalent to calling the 
+ * <code>getPropertyValue</code> method of the 
+ * <code>CSSStyleDeclaration</code> interface. Setting an attribute of this 
+ * interface is equivalent to calling the <code>setProperty</code> method of 
+ * the <code>CSSStyleDeclaration</code> interface. 
+ * <p> A conformant implementation of the CSS module is not required to 
+ * implement the <code>CSS2Properties</code> interface. If an implementation 
+ * does implement this interface, the expectation is that language-specific 
+ * methods can be used to cast from an instance of the 
+ * <code>CSSStyleDeclaration</code> interface to the 
+ * <code>CSS2Properties</code> interface. 
+ * <p> If an implementation does implement this interface, it is expected to 
+ * understand the specific syntax of the shorthand properties, and apply 
+ * their semantics; when the <code>margin</code> property is set, for 
+ * example, the <code>marginTop</code>, <code>marginRight</code>, 
+ * <code>marginBottom</code> and <code>marginLeft</code> properties are 
+ * actually being set by the underlying implementation. 
+ * <p> When dealing with CSS "shorthand" properties, the shorthand properties 
+ * should be decomposed into their component longhand properties as 
+ * appropriate, and when querying for their value, the form returned should 
+ * be the shortest form exactly equivalent to the declarations made in the 
+ * ruleset. However, if there is no shorthand declaration that could be 
+ * added to the ruleset without changing in any way the rules already 
+ * declared in the ruleset (i.e., by adding longhand rules that were 
+ * previously not declared in the ruleset), then the empty string should be 
+ * returned for the shorthand property. 
+ * <p> For example, querying for the <code>font</code> property should not 
+ * return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt 
+ * Arial, sans-serif" suffices. (The normals are initial values, and are 
+ * implied by use of the longhand property.) 
+ * <p> If the values for all the longhand properties that compose a particular 
+ * string are the initial values, then a string consisting of all the 
+ * initial values should be returned (e.g. a <code>border-width</code> value 
+ * of "medium" should be returned as such, not as ""). 
+ * <p> For some shorthand properties that take missing values from other 
+ * sides, such as the <code>margin</code>, <code>padding</code>, and 
+ * <code>border-[width|style|color]</code> properties, the minimum number of 
+ * sides possible should be used; i.e., "0px 10px" will be returned instead 
+ * of "0px 10px 0px 10px". 
+ * <p> If the value of a shorthand property can not be decomposed into its 
+ * component longhand properties, as is the case for the <code>font</code> 
+ * property with a value of "menu", querying for the values of the component 
+ * longhand properties should return the empty string. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSS2Properties {
+    /**
+     *  See the azimuth property definition in CSS2. 
+     */
+    public String getAzimuth();
+    /**
+     *  See the azimuth property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setAzimuth(String azimuth)
+                                             throws DOMException;
+
+    /**
+     *  See the background property definition in CSS2. 
+     */
+    public String getBackground();
+    /**
+     *  See the background property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackground(String background)
+                                             throws DOMException;
+
+    /**
+     *  See the background-attachment property definition in CSS2. 
+     */
+    public String getBackgroundAttachment();
+    /**
+     *  See the background-attachment property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackgroundAttachment(String backgroundAttachment)
+                                             throws DOMException;
+
+    /**
+     *  See the background-color property definition in CSS2. 
+     */
+    public String getBackgroundColor();
+    /**
+     *  See the background-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackgroundColor(String backgroundColor)
+                                             throws DOMException;
+
+    /**
+     *  See the background-image property definition in CSS2. 
+     */
+    public String getBackgroundImage();
+    /**
+     *  See the background-image property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackgroundImage(String backgroundImage)
+                                             throws DOMException;
+
+    /**
+     *  See the background-position property definition in CSS2. 
+     */
+    public String getBackgroundPosition();
+    /**
+     *  See the background-position property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackgroundPosition(String backgroundPosition)
+                                             throws DOMException;
+
+    /**
+     *  See the background-repeat property definition in CSS2. 
+     */
+    public String getBackgroundRepeat();
+    /**
+     *  See the background-repeat property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBackgroundRepeat(String backgroundRepeat)
+                                             throws DOMException;
+
+    /**
+     *  See the border property definition in CSS2. 
+     */
+    public String getBorder();
+    /**
+     *  See the border property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorder(String border)
+                                             throws DOMException;
+
+    /**
+     *  See the border-collapse property definition in CSS2. 
+     */
+    public String getBorderCollapse();
+    /**
+     *  See the border-collapse property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderCollapse(String borderCollapse)
+                                             throws DOMException;
+
+    /**
+     *  See the border-color property definition in CSS2. 
+     */
+    public String getBorderColor();
+    /**
+     *  See the border-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderColor(String borderColor)
+                                             throws DOMException;
+
+    /**
+     *  See the border-spacing property definition in CSS2. 
+     */
+    public String getBorderSpacing();
+    /**
+     *  See the border-spacing property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderSpacing(String borderSpacing)
+                                             throws DOMException;
+
+    /**
+     *  See the border-style property definition in CSS2. 
+     */
+    public String getBorderStyle();
+    /**
+     *  See the border-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderStyle(String borderStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the border-top property definition in CSS2. 
+     */
+    public String getBorderTop();
+    /**
+     *  See the border-top property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderTop(String borderTop)
+                                             throws DOMException;
+
+    /**
+     *  See the border-right property definition in CSS2. 
+     */
+    public String getBorderRight();
+    /**
+     *  See the border-right property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderRight(String borderRight)
+                                             throws DOMException;
+
+    /**
+     *  See the border-bottom property definition in CSS2. 
+     */
+    public String getBorderBottom();
+    /**
+     *  See the border-bottom property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderBottom(String borderBottom)
+                                             throws DOMException;
+
+    /**
+     *  See the border-left property definition in CSS2. 
+     */
+    public String getBorderLeft();
+    /**
+     *  See the border-left property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderLeft(String borderLeft)
+                                             throws DOMException;
+
+    /**
+     *  See the border-top-color property definition in CSS2. 
+     */
+    public String getBorderTopColor();
+    /**
+     *  See the border-top-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderTopColor(String borderTopColor)
+                                             throws DOMException;
+
+    /**
+     *  See the border-right-color property definition in CSS2. 
+     */
+    public String getBorderRightColor();
+    /**
+     *  See the border-right-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderRightColor(String borderRightColor)
+                                             throws DOMException;
+
+    /**
+     *  See the border-bottom-color property definition in CSS2. 
+     */
+    public String getBorderBottomColor();
+    /**
+     *  See the border-bottom-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderBottomColor(String borderBottomColor)
+                                             throws DOMException;
+
+    /**
+     *  See the border-left-color property definition in CSS2. 
+     */
+    public String getBorderLeftColor();
+    /**
+     *  See the border-left-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderLeftColor(String borderLeftColor)
+                                             throws DOMException;
+
+    /**
+     *  See the border-top-style property definition in CSS2. 
+     */
+    public String getBorderTopStyle();
+    /**
+     *  See the border-top-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderTopStyle(String borderTopStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the border-right-style property definition in CSS2. 
+     */
+    public String getBorderRightStyle();
+    /**
+     *  See the border-right-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderRightStyle(String borderRightStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the border-bottom-style property definition in CSS2. 
+     */
+    public String getBorderBottomStyle();
+    /**
+     *  See the border-bottom-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderBottomStyle(String borderBottomStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the border-left-style property definition in CSS2. 
+     */
+    public String getBorderLeftStyle();
+    /**
+     *  See the border-left-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderLeftStyle(String borderLeftStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the border-top-width property definition in CSS2. 
+     */
+    public String getBorderTopWidth();
+    /**
+     *  See the border-top-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderTopWidth(String borderTopWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the border-right-width property definition in CSS2. 
+     */
+    public String getBorderRightWidth();
+    /**
+     *  See the border-right-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderRightWidth(String borderRightWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the border-bottom-width property definition in CSS2. 
+     */
+    public String getBorderBottomWidth();
+    /**
+     *  See the border-bottom-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderBottomWidth(String borderBottomWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the border-left-width property definition in CSS2. 
+     */
+    public String getBorderLeftWidth();
+    /**
+     *  See the border-left-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderLeftWidth(String borderLeftWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the border-width property definition in CSS2. 
+     */
+    public String getBorderWidth();
+    /**
+     *  See the border-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBorderWidth(String borderWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the bottom property definition in CSS2. 
+     */
+    public String getBottom();
+    /**
+     *  See the bottom property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setBottom(String bottom)
+                                             throws DOMException;
+
+    /**
+     *  See the caption-side property definition in CSS2. 
+     */
+    public String getCaptionSide();
+    /**
+     *  See the caption-side property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCaptionSide(String captionSide)
+                                             throws DOMException;
+
+    /**
+     *  See the clear property definition in CSS2. 
+     */
+    public String getClear();
+    /**
+     *  See the clear property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setClear(String clear)
+                                             throws DOMException;
+
+    /**
+     *  See the clip property definition in CSS2. 
+     */
+    public String getClip();
+    /**
+     *  See the clip property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setClip(String clip)
+                                             throws DOMException;
+
+    /**
+     *  See the color property definition in CSS2. 
+     */
+    public String getColor();
+    /**
+     *  See the color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setColor(String color)
+                                             throws DOMException;
+
+    /**
+     *  See the content property definition in CSS2. 
+     */
+    public String getContent();
+    /**
+     *  See the content property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setContent(String content)
+                                             throws DOMException;
+
+    /**
+     *  See the counter-increment property definition in CSS2. 
+     */
+    public String getCounterIncrement();
+    /**
+     *  See the counter-increment property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCounterIncrement(String counterIncrement)
+                                             throws DOMException;
+
+    /**
+     *  See the counter-reset property definition in CSS2. 
+     */
+    public String getCounterReset();
+    /**
+     *  See the counter-reset property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCounterReset(String counterReset)
+                                             throws DOMException;
+
+    /**
+     *  See the cue property definition in CSS2. 
+     */
+    public String getCue();
+    /**
+     *  See the cue property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCue(String cue)
+                                             throws DOMException;
+
+    /**
+     *  See the cue-after property definition in CSS2. 
+     */
+    public String getCueAfter();
+    /**
+     *  See the cue-after property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCueAfter(String cueAfter)
+                                             throws DOMException;
+
+    /**
+     *  See the cue-before property definition in CSS2. 
+     */
+    public String getCueBefore();
+    /**
+     *  See the cue-before property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCueBefore(String cueBefore)
+                                             throws DOMException;
+
+    /**
+     *  See the cursor property definition in CSS2. 
+     */
+    public String getCursor();
+    /**
+     *  See the cursor property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCursor(String cursor)
+                                             throws DOMException;
+
+    /**
+     *  See the direction property definition in CSS2. 
+     */
+    public String getDirection();
+    /**
+     *  See the direction property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setDirection(String direction)
+                                             throws DOMException;
+
+    /**
+     *  See the display property definition in CSS2. 
+     */
+    public String getDisplay();
+    /**
+     *  See the display property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setDisplay(String display)
+                                             throws DOMException;
+
+    /**
+     *  See the elevation property definition in CSS2. 
+     */
+    public String getElevation();
+    /**
+     *  See the elevation property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setElevation(String elevation)
+                                             throws DOMException;
+
+    /**
+     *  See the empty-cells property definition in CSS2. 
+     */
+    public String getEmptyCells();
+    /**
+     *  See the empty-cells property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setEmptyCells(String emptyCells)
+                                             throws DOMException;
+
+    /**
+     *  See the float property definition in CSS2. 
+     */
+    public String getCssFloat();
+    /**
+     *  See the float property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setCssFloat(String cssFloat)
+                                             throws DOMException;
+
+    /**
+     *  See the font property definition in CSS2. 
+     */
+    public String getFont();
+    /**
+     *  See the font property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFont(String font)
+                                             throws DOMException;
+
+    /**
+     *  See the font-family property definition in CSS2. 
+     */
+    public String getFontFamily();
+    /**
+     *  See the font-family property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontFamily(String fontFamily)
+                                             throws DOMException;
+
+    /**
+     *  See the font-size property definition in CSS2. 
+     */
+    public String getFontSize();
+    /**
+     *  See the font-size property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontSize(String fontSize)
+                                             throws DOMException;
+
+    /**
+     *  See the font-size-adjust property definition in CSS2. 
+     */
+    public String getFontSizeAdjust();
+    /**
+     *  See the font-size-adjust property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontSizeAdjust(String fontSizeAdjust)
+                                             throws DOMException;
+
+    /**
+     *  See the font-stretch property definition in CSS2. 
+     */
+    public String getFontStretch();
+    /**
+     *  See the font-stretch property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontStretch(String fontStretch)
+                                             throws DOMException;
+
+    /**
+     *  See the font-style property definition in CSS2. 
+     */
+    public String getFontStyle();
+    /**
+     *  See the font-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontStyle(String fontStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the font-variant property definition in CSS2. 
+     */
+    public String getFontVariant();
+    /**
+     *  See the font-variant property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontVariant(String fontVariant)
+                                             throws DOMException;
+
+    /**
+     *  See the font-weight property definition in CSS2. 
+     */
+    public String getFontWeight();
+    /**
+     *  See the font-weight property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFontWeight(String fontWeight)
+                                             throws DOMException;
+
+    /**
+     *  See the height property definition in CSS2. 
+     */
+    public String getHeight();
+    /**
+     *  See the height property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setHeight(String height)
+                                             throws DOMException;
+
+    /**
+     *  See the left property definition in CSS2. 
+     */
+    public String getLeft();
+    /**
+     *  See the left property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setLeft(String left)
+                                             throws DOMException;
+
+    /**
+     *  See the letter-spacing property definition in CSS2. 
+     */
+    public String getLetterSpacing();
+    /**
+     *  See the letter-spacing property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setLetterSpacing(String letterSpacing)
+                                             throws DOMException;
+
+    /**
+     *  See the line-height property definition in CSS2. 
+     */
+    public String getLineHeight();
+    /**
+     *  See the line-height property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setLineHeight(String lineHeight)
+                                             throws DOMException;
+
+    /**
+     *  See the list-style property definition in CSS2. 
+     */
+    public String getListStyle();
+    /**
+     *  See the list-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setListStyle(String listStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the list-style-image property definition in CSS2. 
+     */
+    public String getListStyleImage();
+    /**
+     *  See the list-style-image property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setListStyleImage(String listStyleImage)
+                                             throws DOMException;
+
+    /**
+     *  See the list-style-position property definition in CSS2. 
+     */
+    public String getListStylePosition();
+    /**
+     *  See the list-style-position property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setListStylePosition(String listStylePosition)
+                                             throws DOMException;
+
+    /**
+     *  See the list-style-type property definition in CSS2. 
+     */
+    public String getListStyleType();
+    /**
+     *  See the list-style-type property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setListStyleType(String listStyleType)
+                                             throws DOMException;
+
+    /**
+     *  See the margin property definition in CSS2. 
+     */
+    public String getMargin();
+    /**
+     *  See the margin property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMargin(String margin)
+                                             throws DOMException;
+
+    /**
+     *  See the margin-top property definition in CSS2. 
+     */
+    public String getMarginTop();
+    /**
+     *  See the margin-top property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarginTop(String marginTop)
+                                             throws DOMException;
+
+    /**
+     *  See the margin-right property definition in CSS2. 
+     */
+    public String getMarginRight();
+    /**
+     *  See the margin-right property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarginRight(String marginRight)
+                                             throws DOMException;
+
+    /**
+     *  See the margin-bottom property definition in CSS2. 
+     */
+    public String getMarginBottom();
+    /**
+     *  See the margin-bottom property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarginBottom(String marginBottom)
+                                             throws DOMException;
+
+    /**
+     *  See the margin-left property definition in CSS2. 
+     */
+    public String getMarginLeft();
+    /**
+     *  See the margin-left property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarginLeft(String marginLeft)
+                                             throws DOMException;
+
+    /**
+     *  See the marker-offset property definition in CSS2. 
+     */
+    public String getMarkerOffset();
+    /**
+     *  See the marker-offset property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarkerOffset(String markerOffset)
+                                             throws DOMException;
+
+    /**
+     *  See the marks property definition in CSS2. 
+     */
+    public String getMarks();
+    /**
+     *  See the marks property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMarks(String marks)
+                                             throws DOMException;
+
+    /**
+     *  See the max-height property definition in CSS2. 
+     */
+    public String getMaxHeight();
+    /**
+     *  See the max-height property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMaxHeight(String maxHeight)
+                                             throws DOMException;
+
+    /**
+     *  See the max-width property definition in CSS2. 
+     */
+    public String getMaxWidth();
+    /**
+     *  See the max-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMaxWidth(String maxWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the min-height property definition in CSS2. 
+     */
+    public String getMinHeight();
+    /**
+     *  See the min-height property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMinHeight(String minHeight)
+                                             throws DOMException;
+
+    /**
+     *  See the min-width property definition in CSS2. 
+     */
+    public String getMinWidth();
+    /**
+     *  See the min-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setMinWidth(String minWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the orphans property definition in CSS2. 
+     */
+    public String getOrphans();
+    /**
+     *  See the orphans property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOrphans(String orphans)
+                                             throws DOMException;
+
+    /**
+     *  See the outline property definition in CSS2. 
+     */
+    public String getOutline();
+    /**
+     *  See the outline property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOutline(String outline)
+                                             throws DOMException;
+
+    /**
+     *  See the outline-color property definition in CSS2. 
+     */
+    public String getOutlineColor();
+    /**
+     *  See the outline-color property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOutlineColor(String outlineColor)
+                                             throws DOMException;
+
+    /**
+     *  See the outline-style property definition in CSS2. 
+     */
+    public String getOutlineStyle();
+    /**
+     *  See the outline-style property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOutlineStyle(String outlineStyle)
+                                             throws DOMException;
+
+    /**
+     *  See the outline-width property definition in CSS2. 
+     */
+    public String getOutlineWidth();
+    /**
+     *  See the outline-width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOutlineWidth(String outlineWidth)
+                                             throws DOMException;
+
+    /**
+     *  See the overflow property definition in CSS2. 
+     */
+    public String getOverflow();
+    /**
+     *  See the overflow property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setOverflow(String overflow)
+                                             throws DOMException;
+
+    /**
+     *  See the padding property definition in CSS2. 
+     */
+    public String getPadding();
+    /**
+     *  See the padding property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPadding(String padding)
+                                             throws DOMException;
+
+    /**
+     *  See the padding-top property definition in CSS2. 
+     */
+    public String getPaddingTop();
+    /**
+     *  See the padding-top property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPaddingTop(String paddingTop)
+                                             throws DOMException;
+
+    /**
+     *  See the padding-right property definition in CSS2. 
+     */
+    public String getPaddingRight();
+    /**
+     *  See the padding-right property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPaddingRight(String paddingRight)
+                                             throws DOMException;
+
+    /**
+     *  See the padding-bottom property definition in CSS2. 
+     */
+    public String getPaddingBottom();
+    /**
+     *  See the padding-bottom property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPaddingBottom(String paddingBottom)
+                                             throws DOMException;
+
+    /**
+     *  See the padding-left property definition in CSS2. 
+     */
+    public String getPaddingLeft();
+    /**
+     *  See the padding-left property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPaddingLeft(String paddingLeft)
+                                             throws DOMException;
+
+    /**
+     *  See the page property definition in CSS2. 
+     */
+    public String getPage();
+    /**
+     *  See the page property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPage(String page)
+                                             throws DOMException;
+
+    /**
+     *  See the page-break-after property definition in CSS2. 
+     */
+    public String getPageBreakAfter();
+    /**
+     *  See the page-break-after property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPageBreakAfter(String pageBreakAfter)
+                                             throws DOMException;
+
+    /**
+     *  See the page-break-before property definition in CSS2. 
+     */
+    public String getPageBreakBefore();
+    /**
+     *  See the page-break-before property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPageBreakBefore(String pageBreakBefore)
+                                             throws DOMException;
+
+    /**
+     *  See the page-break-inside property definition in CSS2. 
+     */
+    public String getPageBreakInside();
+    /**
+     *  See the page-break-inside property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPageBreakInside(String pageBreakInside)
+                                             throws DOMException;
+
+    /**
+     *  See the pause property definition in CSS2. 
+     */
+    public String getPause();
+    /**
+     *  See the pause property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPause(String pause)
+                                             throws DOMException;
+
+    /**
+     *  See the pause-after property definition in CSS2. 
+     */
+    public String getPauseAfter();
+    /**
+     *  See the pause-after property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPauseAfter(String pauseAfter)
+                                             throws DOMException;
+
+    /**
+     *  See the pause-before property definition in CSS2. 
+     */
+    public String getPauseBefore();
+    /**
+     *  See the pause-before property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPauseBefore(String pauseBefore)
+                                             throws DOMException;
+
+    /**
+     *  See the pitch property definition in CSS2. 
+     */
+    public String getPitch();
+    /**
+     *  See the pitch property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPitch(String pitch)
+                                             throws DOMException;
+
+    /**
+     *  See the pitch-range property definition in CSS2. 
+     */
+    public String getPitchRange();
+    /**
+     *  See the pitch-range property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPitchRange(String pitchRange)
+                                             throws DOMException;
+
+    /**
+     *  See the play-during property definition in CSS2. 
+     */
+    public String getPlayDuring();
+    /**
+     *  See the play-during property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPlayDuring(String playDuring)
+                                             throws DOMException;
+
+    /**
+     *  See the position property definition in CSS2. 
+     */
+    public String getPosition();
+    /**
+     *  See the position property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setPosition(String position)
+                                             throws DOMException;
+
+    /**
+     *  See the quotes property definition in CSS2. 
+     */
+    public String getQuotes();
+    /**
+     *  See the quotes property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setQuotes(String quotes)
+                                             throws DOMException;
+
+    /**
+     *  See the richness property definition in CSS2. 
+     */
+    public String getRichness();
+    /**
+     *  See the richness property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setRichness(String richness)
+                                             throws DOMException;
+
+    /**
+     *  See the right property definition in CSS2. 
+     */
+    public String getRight();
+    /**
+     *  See the right property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setRight(String right)
+                                             throws DOMException;
+
+    /**
+     *  See the size property definition in CSS2. 
+     */
+    public String getSize();
+    /**
+     *  See the size property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSize(String size)
+                                             throws DOMException;
+
+    /**
+     *  See the speak property definition in CSS2. 
+     */
+    public String getSpeak();
+    /**
+     *  See the speak property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSpeak(String speak)
+                                             throws DOMException;
+
+    /**
+     *  See the speak-header property definition in CSS2. 
+     */
+    public String getSpeakHeader();
+    /**
+     *  See the speak-header property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSpeakHeader(String speakHeader)
+                                             throws DOMException;
+
+    /**
+     *  See the speak-numeral property definition in CSS2. 
+     */
+    public String getSpeakNumeral();
+    /**
+     *  See the speak-numeral property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSpeakNumeral(String speakNumeral)
+                                             throws DOMException;
+
+    /**
+     *  See the speak-punctuation property definition in CSS2. 
+     */
+    public String getSpeakPunctuation();
+    /**
+     *  See the speak-punctuation property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSpeakPunctuation(String speakPunctuation)
+                                             throws DOMException;
+
+    /**
+     *  See the speech-rate property definition in CSS2. 
+     */
+    public String getSpeechRate();
+    /**
+     *  See the speech-rate property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setSpeechRate(String speechRate)
+                                             throws DOMException;
+
+    /**
+     *  See the stress property definition in CSS2. 
+     */
+    public String getStress();
+    /**
+     *  See the stress property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setStress(String stress)
+                                             throws DOMException;
+
+    /**
+     *  See the table-layout property definition in CSS2. 
+     */
+    public String getTableLayout();
+    /**
+     *  See the table-layout property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTableLayout(String tableLayout)
+                                             throws DOMException;
+
+    /**
+     *  See the text-align property definition in CSS2. 
+     */
+    public String getTextAlign();
+    /**
+     *  See the text-align property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTextAlign(String textAlign)
+                                             throws DOMException;
+
+    /**
+     *  See the text-decoration property definition in CSS2. 
+     */
+    public String getTextDecoration();
+    /**
+     *  See the text-decoration property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTextDecoration(String textDecoration)
+                                             throws DOMException;
+
+    /**
+     *  See the text-indent property definition in CSS2. 
+     */
+    public String getTextIndent();
+    /**
+     *  See the text-indent property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTextIndent(String textIndent)
+                                             throws DOMException;
+
+    /**
+     *  See the text-shadow property definition in CSS2. 
+     */
+    public String getTextShadow();
+    /**
+     *  See the text-shadow property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTextShadow(String textShadow)
+                                             throws DOMException;
+
+    /**
+     *  See the text-transform property definition in CSS2. 
+     */
+    public String getTextTransform();
+    /**
+     *  See the text-transform property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTextTransform(String textTransform)
+                                             throws DOMException;
+
+    /**
+     *  See the top property definition in CSS2. 
+     */
+    public String getTop();
+    /**
+     *  See the top property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setTop(String top)
+                                             throws DOMException;
+
+    /**
+     *  See the unicode-bidi property definition in CSS2. 
+     */
+    public String getUnicodeBidi();
+    /**
+     *  See the unicode-bidi property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setUnicodeBidi(String unicodeBidi)
+                                             throws DOMException;
+
+    /**
+     *  See the vertical-align property definition in CSS2. 
+     */
+    public String getVerticalAlign();
+    /**
+     *  See the vertical-align property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setVerticalAlign(String verticalAlign)
+                                             throws DOMException;
+
+    /**
+     *  See the visibility property definition in CSS2. 
+     */
+    public String getVisibility();
+    /**
+     *  See the visibility property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setVisibility(String visibility)
+                                             throws DOMException;
+
+    /**
+     *  See the voice-family property definition in CSS2. 
+     */
+    public String getVoiceFamily();
+    /**
+     *  See the voice-family property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setVoiceFamily(String voiceFamily)
+                                             throws DOMException;
+
+    /**
+     *  See the volume property definition in CSS2. 
+     */
+    public String getVolume();
+    /**
+     *  See the volume property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setVolume(String volume)
+                                             throws DOMException;
+
+    /**
+     *  See the white-space property definition in CSS2. 
+     */
+    public String getWhiteSpace();
+    /**
+     *  See the white-space property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setWhiteSpace(String whiteSpace)
+                                             throws DOMException;
+
+    /**
+     *  See the widows property definition in CSS2. 
+     */
+    public String getWidows();
+    /**
+     *  See the widows property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setWidows(String widows)
+                                             throws DOMException;
+
+    /**
+     *  See the width property definition in CSS2. 
+     */
+    public String getWidth();
+    /**
+     *  See the width property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setWidth(String width)
+                                             throws DOMException;
+
+    /**
+     *  See the word-spacing property definition in CSS2. 
+     */
+    public String getWordSpacing();
+    /**
+     *  See the word-spacing property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setWordSpacing(String wordSpacing)
+                                             throws DOMException;
+
+    /**
+     *  See the z-index property definition in CSS2. 
+     */
+    public String getZIndex();
+    /**
+     *  See the z-index property definition in CSS2. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the new value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setZIndex(String zIndex)
+                                             throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSCharsetRule</code> interface represents a @charset rule 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> The value of the @charset rule (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 CSS document representation) but this is not 
+ * reflected in the <code>CSSCharsetRule</code>. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSCharsetRule extends CSSRule {
+    /**
+     *  The encoding information used in this <code>@charset</code> rule. 
+     */
+    public String getEncoding();
+    /**
+     *  The encoding information used in this <code>@charset</code> rule. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified encoding value has a syntax error 
+     *   and is unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is 
+     *   readonly.
+     */
+    public void setEncoding(String encoding)
+                           throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>CSSFontFaceRule</code> interface represents a @font-face rule in 
+ * a CSS style sheet. The <code>@font-face</code> rule is used to hold a set 
+ * of font descriptions. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSFontFaceRule extends CSSRule {
+    /**
+     *  The declaration-block of this rule. 
+     */
+    public CSSStyleDeclaration getStyle();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.stylesheets.MediaList;
+
+/**
+ *  The <code>CSSImportRule</code> interface represents a @import rule within 
+ * a CSS style sheet. The <code>@import</code> rule is used to import style 
+ * rules from other style sheets. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSImportRule extends CSSRule {
+    /**
+     *  The location of the style sheet to be imported. The attribute will not 
+     * contain the <code>"url(...)"</code> specifier around the URI. 
+     */
+    public String getHref();
+
+    /**
+     *  A list of media types for which this style sheet may be used. 
+     */
+    public MediaList getMedia();
+
+    /**
+     * 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). 
+     */
+    public CSSStyleSheet getStyleSheet();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.stylesheets.MediaList;
+
+/**
+ *  The <code>CSSMediaRule</code> interface represents a @media rule in a CSS 
+ * style sheet. A <code>@media</code> rule can be used to delimit style 
+ * rules for specific media types. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSMediaRule extends CSSRule {
+    /**
+     *  A list of media types for this rule. 
+     */
+    public MediaList getMedia();
+
+    /**
+     *  A list of all CSS rules contained within the media block. 
+     */
+    public CSSRuleList getCssRules();
+
+    /**
+     *  Used to insert a new rule into the media block. 
+     * @param rule  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. 
+     * @param index  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. 
+     * @return  The index within the media block's rule collection of the 
+     *   newly inserted rule. 
+     * @exception DOMException
+     *   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.
+     *   <br>INDEX_SIZE_ERR: Raised if the specified index is not a valid 
+     *   insertion point.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is 
+     *   readonly.
+     *   <br>SYNTAX_ERR: Raised if the specified rule has a syntax error and 
+     *   is unparsable.
+     */
+    public int insertRule(String rule, 
+                          int index)
+                          throws DOMException;
+
+    /**
+     *  Used to delete a rule from the media block. 
+     * @param index  The index within the media block's rule collection of 
+     *   the rule to remove. 
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index does not correspond to 
+     *   a rule in the media rule list.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is 
+     *   readonly.
+     */
+    public void deleteRule(int index)
+                           throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSPageRule</code> interface represents a @page rule 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSPageRule extends CSSRule {
+    /**
+     *  The parsable textual representation of the page selector for the rule. 
+     */
+    public String getSelectorText();
+    /**
+     *  The parsable textual representation of the page selector for the rule. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified CSS string value has a syntax 
+     *   error and is unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
+     */
+    public void setSelectorText(String selectorText)
+                           throws DOMException;
+
+    /**
+     *  The declaration-block of this rule. 
+     */
+    public CSSStyleDeclaration getStyle();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSPrimitiveValue</code> interface represents a single CSS value
+ * . 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> 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSPrimitiveValue extends CSSValue {
+    // UnitTypes
+    /**
+     * The value is not a recognized CSS2 value. The value can only be 
+     * obtained by using the <code>cssText</code> attribute.
+     */
+    public static final short CSS_UNKNOWN               = 0;
+    /**
+     * The value is a simple number. The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_NUMBER                = 1;
+    /**
+     * The value is a percentage. The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_PERCENTAGE            = 2;
+    /**
+     * The value is a length (ems). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_EMS                   = 3;
+    /**
+     * The value is a length (exs). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_EXS                   = 4;
+    /**
+     * The value is a length (px). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_PX                    = 5;
+    /**
+     * The value is a length (cm). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_CM                    = 6;
+    /**
+     * The value is a length (mm). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_MM                    = 7;
+    /**
+     * The value is a length (in). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_IN                    = 8;
+    /**
+     * The value is a length (pt). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_PT                    = 9;
+    /**
+     * The value is a length (pc). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_PC                    = 10;
+    /**
+     * The value is an angle (deg). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_DEG                   = 11;
+    /**
+     * The value is an angle (rad). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_RAD                   = 12;
+    /**
+     * The value is an angle (grad). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_GRAD                  = 13;
+    /**
+     * The value is a time (ms). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_MS                    = 14;
+    /**
+     * The value is a time (s). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_S                     = 15;
+    /**
+     * The value is a frequency (Hz). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_HZ                    = 16;
+    /**
+     * The value is a frequency (kHz). The value can be obtained by using the 
+     * <code>getFloatValue</code> method.
+     */
+    public static final short CSS_KHZ                   = 17;
+    /**
+     * The value is a number with an unknown dimension. The value can be 
+     * obtained by using the <code>getFloatValue</code> method.
+     */
+    public static final short CSS_DIMENSION             = 18;
+    /**
+     * The value is a STRING. The value can be obtained by using the 
+     * <code>getStringValue</code> method.
+     */
+    public static final short CSS_STRING                = 19;
+    /**
+     * The value is a URI. The value can be obtained by using the 
+     * <code>getStringValue</code> method.
+     */
+    public static final short CSS_URI                   = 20;
+    /**
+     * The value is an identifier. The value can be obtained by using the 
+     * <code>getStringValue</code> method.
+     */
+    public static final short CSS_IDENT                 = 21;
+    /**
+     * The value is a attribute function. The value can be obtained by using 
+     * the <code>getStringValue</code> method.
+     */
+    public static final short CSS_ATTR                  = 22;
+    /**
+     * The value is a counter or counters function. The value can be obtained 
+     * by using the <code>getCounterValue</code> method.
+     */
+    public static final short CSS_COUNTER               = 23;
+    /**
+     * The value is a rect function. The value can be obtained by using the 
+     * <code>getRectValue</code> method.
+     */
+    public static final short CSS_RECT                  = 24;
+    /**
+     * The value is a RGB color. The value can be obtained by using the 
+     * <code>getRGBColorValue</code> method.
+     */
+    public static final short CSS_RGBCOLOR              = 25;
+
+    /**
+     * The type of the value as defined by the constants specified above.
+     */
+    public short getPrimitiveType();
+
+    /**
+     *  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. 
+     * @param unitType  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>). 
+     * @param floatValue  The new float value. 
+     * @exception DOMException
+     *    INVALID_ACCESS_ERR: Raised if the attached property doesn't support 
+     *   the float value or the unit type.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setFloatValue(short unitType, 
+                              float floatValue)
+                              throws DOMException;
+
+    /**
+     *  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. 
+     * @param unitType  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>). 
+     * @return  The float value in the specified unit. 
+     * @exception DOMException
+     *    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. 
+     */
+    public float getFloatValue(short unitType)
+                               throws DOMException;
+
+    /**
+     *  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. 
+     * @param stringType  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>). 
+     * @param stringValue  The new string value. 
+     * @exception DOMException
+     *    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.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
+     */
+    public void setStringValue(short stringType, 
+                               String stringValue)
+                               throws DOMException;
+
+    /**
+     *  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.  Some 
+     * properties (like 'font-family' or 'voice-family') convert a 
+     * whitespace separated list of idents to a string. 
+     * @return  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>). 
+     * @exception DOMException
+     *    INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string 
+     *   value. 
+     */
+    public String getStringValue()
+                                 throws DOMException;
+
+    /**
+     *  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. 
+     * @return The Counter value.
+     * @exception DOMException
+     *    INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a 
+     *   Counter value (e.g. this is not <code>CSS_COUNTER</code>). 
+     */
+    public Counter getCounterValue()
+                                   throws DOMException;
+
+    /**
+     *  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. 
+     * @return The Rect value.
+     * @exception DOMException
+     *    INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect 
+     *   value. (e.g. this is not <code>CSS_RECT</code>). 
+     */
+    public Rect getRectValue()
+                             throws DOMException;
+
+    /**
+     *  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. 
+     * @return the RGB color value.
+     * @exception DOMException
+     *    INVALID_ACCESS_ERR: Raised if the attached property can't return a 
+     *   RGB color value (e.g. this is not <code>CSS_RGBCOLOR</code>). 
+     */
+    public RGBColor getRGBColorValue()
+                                     throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSRule</code> interface is the abstract base interface for any 
+ * type of CSS statement. This includes both rule sets and at-rules. 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSRule {
+    // RuleType
+    /**
+     * The rule is a <code>CSSUnknownRule</code>.
+     */
+    public static final short UNKNOWN_RULE              = 0;
+    /**
+     * The rule is a <code>CSSStyleRule</code>.
+     */
+    public static final short STYLE_RULE                = 1;
+    /**
+     * The rule is a <code>CSSCharsetRule</code>.
+     */
+    public static final short CHARSET_RULE              = 2;
+    /**
+     * The rule is a <code>CSSImportRule</code>.
+     */
+    public static final short IMPORT_RULE               = 3;
+    /**
+     * The rule is a <code>CSSMediaRule</code>.
+     */
+    public static final short MEDIA_RULE                = 4;
+    /**
+     * The rule is a <code>CSSFontFaceRule</code>.
+     */
+    public static final short FONT_FACE_RULE            = 5;
+    /**
+     * The rule is a <code>CSSPageRule</code>.
+     */
+    public static final short PAGE_RULE                 = 6;
+
+    /**
+     *  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>. 
+     */
+    public short getType();
+
+    /**
+     *  The parsable textual representation of the rule. This reflects the 
+     * current state of the rule and not its initial value. 
+     */
+    public String getCssText();
+    /**
+     *  The parsable textual representation of the rule. This reflects the 
+     * current state of the rule and not its initial value. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified CSS string value has a syntax 
+     *   error and is unparsable.
+     *   <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string 
+     *   value represents a different type of rule than the current one.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at 
+     *   this point in the style sheet.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly.
+     */
+    public void setCssText(String cssText)
+                        throws DOMException;
+
+    /**
+     *  The style sheet that contains this rule. 
+     */
+    public CSSStyleSheet getParentStyleSheet();
+
+    /**
+     *  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>. 
+     */
+    public CSSRule getParentRule();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>CSSRuleList</code> interface provides the abstraction of an 
+ * ordered collection of CSS rules. 
+ * <p> The items in the <code>CSSRuleList</code> are accessible via an 
+ * integral index, starting from 0. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSRuleList {
+    /**
+     *  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. 
+     */
+    public int getLength();
+
+    /**
+     *  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>. 
+     * @param index Index into the collection
+     * @return 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. 
+     */
+    public CSSRule item(int index);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSStyleDeclaration</code> interface represents a single CSS 
+ * declaration block. 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> 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 CSS shorthand properties for that level. For 
+ * a further discussion of shorthand properties, see the 
+ * <code>CSS2Properties</code> interface. 
+ * <p> This interface is also used to provide a read-only access to the 
+ * computed values of an element. See also the <code>ViewCSS</code> 
+ * interface.  The CSS Object Model doesn't provide an access to the 
+ * specified or actual values of the CSS cascade. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSStyleDeclaration {
+    /**
+     *  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. 
+     */
+    public String getCssText();
+    /**
+     *  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. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified CSS string value has a syntax 
+     *   error and is unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is 
+     *   readonly or a property is readonly.
+     */
+    public void setCssText(String cssText)
+                       throws DOMException;
+
+    /**
+     *  Used to retrieve the value of a CSS property if it has been explicitly 
+     * set within this declaration block. 
+     * @param propertyName  The name of the CSS property. See the CSS 
+     *   property index. 
+     * @return  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. 
+     */
+    public String getPropertyValue(String propertyName);
+
+    /**
+     *  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 shorthand 
+     * property. Shorthand property values can only be accessed and modified 
+     * as strings, using the <code>getPropertyValue</code> and 
+     * <code>setProperty</code> methods. 
+     * @param propertyName  The name of the CSS property. See the CSS 
+     *   property index. 
+     * @return  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. 
+     */
+    public CSSValue getPropertyCSSValue(String propertyName);
+
+    /**
+     *  Used to remove a CSS property if it has been explicitly set within 
+     * this declaration block. 
+     * @param propertyName  The name of the CSS property. See the CSS 
+     *   property index. 
+     * @return  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. 
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly 
+     *   or the property is readonly.
+     */
+    public String removeProperty(String propertyName)
+                                 throws DOMException;
+
+    /**
+     *  Used to retrieve the priority of a CSS property (e.g. the 
+     * <code>"important"</code> qualifier) if the priority has been 
+     * explicitly set in this declaration block. 
+     * @param propertyName  The name of the CSS property. See the CSS 
+     *   property index. 
+     * @return  A string representing the priority (e.g. 
+     *   <code>"important"</code>) if the property has been explicitly set 
+     *   in this declaration block and has a priority specified. The empty 
+     *   string otherwise. 
+     */
+    public String getPropertyPriority(String propertyName);
+
+    /**
+     *  Used to set a property value and priority within this declaration 
+     * block. <code>setProperty</code> permits to modify a property or add a 
+     * new one in the declaration block. Any call to this method may modify 
+     * the order of properties in the <code>item</code> method.
+     * @param propertyName  The name of the CSS property. See the CSS 
+     *   property index. 
+     * @param value  The new value of the property. 
+     * @param priority  The new priority of the property (e.g. 
+     *   <code>"important"</code>) or the empty string if none.  
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified value has a syntax error and is 
+     *   unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is 
+     *   readonly or the property is readonly.
+     */
+    public void setProperty(String propertyName, 
+                            String value, 
+                            String priority)
+                            throws DOMException;
+
+    /**
+     *  The number of properties that have been explicitly set in this 
+     * declaration block. The range of valid indices is 0 to length-1 
+     * inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  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. 
+     * @param index  Index of the property name to retrieve. 
+     * @return  The name of the property at this ordinal position. The empty 
+     *   string if no property exists at this position. 
+     */
+    public String item(int index);
+
+    /**
+     *  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>. 
+     */
+    public CSSRule getParentRule();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>CSSStyleRule</code> interface represents a single rule set in a 
+ * CSS style sheet. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSStyleRule extends CSSRule {
+    /**
+     *  The textual representation of the selector for the rule set. The 
+     * implementation may have stripped out insignificant whitespace while 
+     * parsing the selector. 
+     */
+    public String getSelectorText();
+    /**
+     *  The textual representation of the selector for the rule set. The 
+     * implementation may have stripped out insignificant whitespace while 
+     * parsing the selector. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified CSS string value has a syntax 
+     *   error and is unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
+     */
+    public void setSelectorText(String selectorText)
+                        throws DOMException;
+
+    /**
+     *  The declaration-block of this rule set. 
+     */
+    public CSSStyleDeclaration getStyle();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.stylesheets.StyleSheet;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSStyleSheet extends StyleSheet {
+    /**
+     *  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>. 
+     */
+    public CSSRule getOwnerRule();
+
+    /**
+     *  The list of all CSS rules contained within the style sheet. This 
+     * includes both rule sets and at-rules. 
+     */
+    public CSSRuleList getCssRules();
+
+    /**
+     *  Used to insert a new rule into the style sheet. The new rule now 
+     * becomes part of the cascade. 
+     * @param rule  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. 
+     * @param index  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. 
+     * @return  The index within the style sheet's rule collection of the 
+     *   newly inserted rule. 
+     * @exception DOMException
+     *   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.
+     *   <br>INDEX_SIZE_ERR: Raised if the specified index is not a valid 
+     *   insertion point.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is 
+     *   readonly.
+     *   <br>SYNTAX_ERR: Raised if the specified rule has a syntax error and 
+     *   is unparsable.
+     */
+    public int insertRule(String rule, 
+                          int index)
+                          throws DOMException;
+
+    /**
+     *  Used to delete a rule from the style sheet. 
+     * @param index  The index within the style sheet's rule list of the rule 
+     *   to remove. 
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index does not correspond to 
+     *   a rule in the style sheet's rule list.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is 
+     *   readonly.
+     */
+    public void deleteRule(int index)
+                           throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>CSSUnknownRule</code> interface represents an at-rule not 
+ * supported by this user agent. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSUnknownRule extends CSSRule {
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSValue {
+    // UnitTypes
+    /**
+     * The value is inherited and the <code>cssText</code> contains "inherit".
+     */
+    public static final short CSS_INHERIT               = 0;
+    /**
+     * 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.
+     */
+    public static final short CSS_PRIMITIVE_VALUE       = 1;
+    /**
+     * 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.
+     */
+    public static final short CSS_VALUE_LIST            = 2;
+    /**
+     * The value is a custom value.
+     */
+    public static final short CSS_CUSTOM                = 3;
+
+    /**
+     *  A string representation of the current value. 
+     */
+    public String getCssText();
+    /**
+     *  A string representation of the current value. 
+     * @exception DOMException
+     *    SYNTAX_ERR: Raised if the specified CSS string value has a syntax 
+     *   error (according to the attached property) or is unparsable. 
+     *   <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string 
+     *   value represents a different type of values than the values allowed 
+     *   by the CSS property.
+     *   <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly. 
+     */
+    public void setCssText(String cssText)
+                       throws DOMException;
+
+    /**
+     *  A code defining the type of the value as defined above. 
+     */
+    public short getCssValueType();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ * The <code>CSSValueList</code> interface provides the abstraction of an 
+ * ordered collection of CSS values.
+ * <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> The items in the <code>CSSValueList</code> are accessible via an 
+ * integral index, starting from 0. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface CSSValueList extends CSSValue {
+    /**
+     * 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.
+     */
+    public int getLength();
+
+    /**
+     * 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>.
+     * @param index Index into the collection.
+     * @return 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.
+     */
+    public CSSValue item(int index);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>Counter</code> interface is used to represent any counter or 
+ * counters function value. This interface reflects the values in the 
+ * underlying style property. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface Counter {
+    /**
+     *  This attribute is used for the identifier of the counter. 
+     */
+    public String getIdentifier();
+
+    /**
+     *  This attribute is used for the style of the list. 
+     */
+    public String getListStyle();
+
+    /**
+     *  This attribute is used for the separator of the nested counters. 
+     */
+    public String getSeparator();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.DOMException;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM   Level 2
+ */
+public interface DOMImplementationCSS extends DOMImplementation {
+    /**
+     * Creates a new <code>CSSStyleSheet</code>.
+     * @param title  The advisory title. See also the  section. 
+     * @param media  The comma-separated list of media associated with the 
+     *   new style sheet. See also the  section. 
+     * @return A new CSS style sheet.
+     * @exception DOMException
+     *    SYNTAX_ERR: Raised if the specified media string value has a syntax 
+     *   error and is unparsable. 
+     */
+    public CSSStyleSheet createCSSStyleSheet(String title, 
+                                             String media)
+                                             throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.stylesheets.DocumentStyle;
+
+/**
+ * This interface represents a document with a CSS view.
+ * <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 override style sheet. 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> 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentCSS extends DocumentStyle {
+    /**
+     *  This method is used to retrieve the override style declaration for a 
+     * specified element and a specified pseudo-element. 
+     * @param elt  The element whose style is to be modified. This parameter 
+     *   cannot be null. 
+     * @param pseudoElt  The pseudo-element or <code>null</code> if none. 
+     * @return  The override style declaration. 
+     */
+    public CSSStyleDeclaration getOverrideStyle(Element elt, 
+                                                String pseudoElt);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  Inline style information attached to elements is exposed through the 
+ * <code>style</code> attribute. This represents the contents of the STYLE 
+ * 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface ElementCSSInlineStyle {
+    /**
+     *  The style attribute. 
+     */
+    public CSSStyleDeclaration getStyle();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>RGBColor</code> interface is used to represent any RGB color 
+ * 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> 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> 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> A color percentage value can always be converted to a number and vice 
+ * versa. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface RGBColor {
+    /**
+     *  This attribute is used for the red value of the RGB color. 
+     */
+    public CSSPrimitiveValue getRed();
+
+    /**
+     *  This attribute is used for the green value of the RGB color. 
+     */
+    public CSSPrimitiveValue getGreen();
+
+    /**
+     *  This attribute is used for the blue value of the RGB color. 
+     */
+    public CSSPrimitiveValue getBlue();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+/**
+ *  The <code>Rect</code> interface is used to represent any rect 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface Rect {
+    /**
+     *  This attribute is used for the top of the rect. 
+     */
+    public CSSPrimitiveValue getTop();
+
+    /**
+     *  This attribute is used for the right of the rect. 
+     */
+    public CSSPrimitiveValue getRight();
+
+    /**
+     *  This attribute is used for the bottom of the rect. 
+     */
+    public CSSPrimitiveValue getBottom();
+
+    /**
+     *  This attribute is used for the left of the rect. 
+     */
+    public CSSPrimitiveValue getLeft();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.css;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.views.AbstractView;
+
+/**
+ *  This interface represents a CSS view. The <code>getComputedStyle</code> 
+ * method provides a read only access to the computed values of an element. 
+ * <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> 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface ViewCSS extends AbstractView {
+    /**
+     *  This method is used to get the computed style as it is defined in [<a href='http://www.w3.org/TR/1998/REC-CSS2-19980512'>CSS2</a>]. 
+     * @param elt  The element whose style is to be computed. This parameter 
+     *   cannot be null. 
+     * @param pseudoElt  The pseudo-element or <code>null</code> if none. 
+     * @return  The computed style. The <code>CSSStyleDeclaration</code> is 
+     *   read-only and contains only absolute values. 
+     */
+    public CSSStyleDeclaration getComputedStyle(Element elt, 
+                                                String pseudoElt);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentEvent {
+    /**
+     * 
+     * @param eventType 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.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.
+     * @return The newly created <code>Event</code>
+     * @exception DOMException
+     *   NOT_SUPPORTED_ERR: Raised if the implementation does not support the 
+     *   type of <code>Event</code> interface requested
+     */
+    public Event createEvent(String eventType)
+                             throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+/**
+ * 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface Event {
+    // PhaseType
+    /**
+     * The current event phase is the capturing phase.
+     */
+    public static final short CAPTURING_PHASE           = 1;
+    /**
+     * The event is currently being evaluated at the target 
+     * <code>EventTarget</code>.
+     */
+    public static final short AT_TARGET                 = 2;
+    /**
+     * The current event phase is the bubbling phase.
+     */
+    public static final short BUBBLING_PHASE            = 3;
+
+    /**
+     * The name of the event (case-insensitive). The name must be an XML name.
+     */
+    public String getType();
+
+    /**
+     * Used to indicate the <code>EventTarget</code> to which the event was 
+     * originally dispatched. 
+     */
+    public EventTarget getTarget();
+
+    /**
+     * Used to indicate the <code>EventTarget</code> whose 
+     * <code>EventListeners</code> are currently being processed. This is 
+     * particularly useful during capturing and bubbling. 
+     */
+    public EventTarget getCurrentTarget();
+
+    /**
+     * Used to indicate which phase of event flow is currently being 
+     * evaluated. 
+     */
+    public short getEventPhase();
+
+    /**
+     * 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. 
+     */
+    public boolean getBubbles();
+
+    /**
+     * 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. 
+     */
+    public boolean getCancelable();
+
+    /**
+     *  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. 
+     */
+    public long getTimeStamp();
+
+    /**
+     * 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.
+     */
+    public void stopPropagation();
+
+    /**
+     * 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. 
+     */
+    public void preventDefault();
+
+    /**
+     * 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.
+     * @param eventTypeArg 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 XML name. 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.
+     * @param canBubbleArg Specifies whether or not the event can bubble.
+     * @param cancelableArg Specifies whether or not the event's default 
+     *   action can be prevented.
+     */
+    public void initEvent(String eventTypeArg, 
+                          boolean canBubbleArg, 
+                          boolean cancelableArg);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+/**
+ *  Event operations may throw an <code>EventException</code> as specified in 
+ * their method descriptions. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public class EventException extends RuntimeException {
+    public EventException(short code, String message) {
+       super(message);
+       this.code = code;
+    }
+    public short   code;
+    // EventExceptionCode
+    /**
+     *  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. 
+     */
+    public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+/**
+ *  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> 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface EventListener {
+    /**
+     *  This method is called whenever an event occurs of the type for which 
+     * the <code> EventListener</code> interface was registered. 
+     * @param evt  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. 
+     */
+    public void handleEvent(Event evt);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface EventTarget {
+    /**
+     * 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. 
+     * <br> 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. 
+     * @param type The event type for which the user is registering
+     * @param listener The <code>listener</code> parameter takes an interface 
+     *   implemented by the user which contains the methods to be called 
+     *   when the event occurs.
+     * @param useCapture 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.
+     */
+    public void addEventListener(String type, 
+                                 EventListener listener, 
+                                 boolean useCapture);
+
+    /**
+     * 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.
+     * <br>Calling <code>removeEventListener</code> with arguments which do 
+     * not identify any currently registered <code>EventListener</code> on 
+     * the <code>EventTarget</code> has no effect.
+     * @param type Specifies the event type of the <code>EventListener</code> 
+     *   being removed. 
+     * @param listener The <code>EventListener</code> parameter indicates the 
+     *   <code>EventListener </code> to be removed. 
+     * @param useCapture 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. 
+     */
+    public void removeEventListener(String type, 
+                                    EventListener listener, 
+                                    boolean useCapture);
+
+    /**
+     * 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. 
+     * @param evt Specifies the event type, behavior, and contextual 
+     *   information to be used in processing the event.
+     * @return 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. 
+     * @exception EventException
+     *   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.
+     */
+    public boolean dispatchEvent(Event evt)
+                                 throws EventException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+import org.w3c.dom.views.AbstractView;
+
+/**
+ * The <code>MouseEvent</code> interface provides specific contextual 
+ * information associated with Mouse events.
+ * <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>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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface MouseEvent extends UIEvent {
+    /**
+     * The horizontal coordinate at which the event occurred relative to the 
+     * origin of the screen coordinate system.
+     */
+    public int getScreenX();
+
+    /**
+     * The vertical coordinate at which the event occurred relative to the 
+     * origin of the screen coordinate system.
+     */
+    public int getScreenY();
+
+    /**
+     * The horizontal coordinate at which the event occurred relative to the 
+     * DOM implementation's client area.
+     */
+    public int getClientX();
+
+    /**
+     * The vertical coordinate at which the event occurred relative to the DOM 
+     * implementation's client area.
+     */
+    public int getClientY();
+
+    /**
+     * Used to indicate whether the 'ctrl' key was depressed during the firing 
+     * of the event.
+     */
+    public boolean getCtrlKey();
+
+    /**
+     * Used to indicate whether the 'shift' key was depressed during the 
+     * firing of the event.
+     */
+    public boolean getShiftKey();
+
+    /**
+     * 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.
+     */
+    public boolean getAltKey();
+
+    /**
+     * 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.
+     */
+    public boolean getMetaKey();
+
+    /**
+     * 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.
+     */
+    public short getButton();
+
+    /**
+     * 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.
+     */
+    public EventTarget getRelatedTarget();
+
+    /**
+     * 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.
+     * @param typeArg Specifies the event type.
+     * @param canBubbleArg Specifies whether or not the event can bubble.
+     * @param cancelableArg Specifies whether or not the event's default 
+     *   action can be prevented.
+     * @param viewArg Specifies the <code>Event</code>'s 
+     *   <code>AbstractView</code>.
+     * @param detailArg Specifies the <code>Event</code>'s mouse click count.
+     * @param screenXArg Specifies the <code>Event</code>'s screen x 
+     *   coordinate
+     * @param screenYArg Specifies the <code>Event</code>'s screen y 
+     *   coordinate
+     * @param clientXArg Specifies the <code>Event</code>'s client x 
+     *   coordinate
+     * @param clientYArg Specifies the <code>Event</code>'s client y 
+     *   coordinate
+     * @param ctrlKeyArg Specifies whether or not control key was depressed 
+     *   during the <code>Event</code>.
+     * @param altKeyArg Specifies whether or not alt key was depressed during 
+     *   the <code>Event</code>.
+     * @param shiftKeyArg Specifies whether or not shift key was depressed 
+     *   during the <code>Event</code>.
+     * @param metaKeyArg Specifies whether or not meta key was depressed 
+     *   during the <code>Event</code>.
+     * @param buttonArg Specifies the <code>Event</code>'s mouse button.
+     * @param relatedTargetArg Specifies the <code>Event</code>'s related 
+     *   <code>EventTarget</code>.
+     */
+    public void initMouseEvent(String typeArg, 
+                               boolean canBubbleArg, 
+                               boolean cancelableArg, 
+                               AbstractView viewArg, 
+                               int detailArg, 
+                               int screenXArg, 
+                               int screenYArg, 
+                               int clientXArg, 
+                               int clientYArg, 
+                               boolean ctrlKeyArg, 
+                               boolean altKeyArg, 
+                               boolean shiftKeyArg, 
+                               boolean metaKeyArg, 
+                               short buttonArg, 
+                               EventTarget relatedTargetArg);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+import org.w3c.dom.Node;
+
+/**
+ * The <code>MutationEvent</code> interface provides specific contextual 
+ * information associated with Mutation events. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface MutationEvent extends Event {
+    // attrChangeType
+    /**
+     * The <code>Attr</code> was modified in place.
+     */
+    public static final short MODIFICATION              = 1;
+    /**
+     * The <code>Attr</code> was just added.
+     */
+    public static final short ADDITION                  = 2;
+    /**
+     * The <code>Attr</code> was just removed.
+     */
+    public static final short REMOVAL                   = 3;
+
+    /**
+     *  <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. 
+     */
+    public Node getRelatedNode();
+
+    /**
+     *  <code>prevValue</code> indicates the previous value of the 
+     * <code>Attr</code> node in DOMAttrModified events, and of the 
+     * <code>CharacterData</code> node in DOMCharacterDataModified events. 
+     */
+    public String getPrevValue();
+
+    /**
+     *  <code>newValue</code> indicates the new value of the <code>Attr</code> 
+     * node in DOMAttrModified events, and of the <code>CharacterData</code> 
+     * node in DOMCharacterDataModified events. 
+     */
+    public String getNewValue();
+
+    /**
+     *  <code>attrName</code> indicates the name of the changed 
+     * <code>Attr</code> node in a DOMAttrModified event. 
+     */
+    public String getAttrName();
+
+    /**
+     *  <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>. 
+     */
+    public short getAttrChange();
+
+    /**
+     * 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.
+     * @param typeArg Specifies the event type.
+     * @param canBubbleArg Specifies whether or not the event can bubble.
+     * @param cancelableArg Specifies whether or not the event's default 
+     *   action can be prevented.
+     * @param relatedNodeArg Specifies the <code>Event</code>'s related Node.
+     * @param prevValueArg Specifies the <code>Event</code>'s 
+     *   <code>prevValue</code> attribute. This value may be null.
+     * @param newValueArg Specifies the <code>Event</code>'s 
+     *   <code>newValue</code> attribute. This value may be null.
+     * @param attrNameArg Specifies the <code>Event</code>'s 
+     *   <code>attrName</code> attribute. This value may be null.
+     * @param attrChangeArg Specifies the <code>Event</code>'s 
+     *   <code>attrChange</code> attribute
+     */
+    public void initMutationEvent(String typeArg, 
+                                  boolean canBubbleArg, 
+                                  boolean cancelableArg, 
+                                  Node relatedNodeArg, 
+                                  String prevValueArg, 
+                                  String newValueArg, 
+                                  String attrNameArg, 
+                                  short attrChangeArg);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.events;
+
+import org.w3c.dom.views.AbstractView;
+
+/**
+ * The <code>UIEvent</code> interface provides specific contextual information 
+ * associated with User Interface events.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
+ * @since DOM Level 2
+ */
+public interface UIEvent extends Event {
+    /**
+     * The <code>view</code> attribute identifies the <code>AbstractView</code>
+     *  from which the event was generated.
+     */
+    public AbstractView getView();
+
+    /**
+     * Specifies some detail information about the <code>Event</code>, 
+     * depending on the type of event.
+     */
+    public int getDetail();
+
+    /**
+     * 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.
+     * @param typeArg Specifies the event type.
+     * @param canBubbleArg Specifies whether or not the event can bubble.
+     * @param cancelableArg Specifies whether or not the event's default 
+     *   action can be prevented.
+     * @param viewArg Specifies the <code>Event</code>'s 
+     *   <code>AbstractView</code>.
+     * @param detailArg Specifies the <code>Event</code>'s detail.
+     */
+    public void initUIEvent(String typeArg, 
+                            boolean canBubbleArg, 
+                            boolean cancelableArg, 
+                            AbstractView viewArg, 
+                            int detailArg);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The anchor element. See the A element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLAnchorElement extends HTMLElement {
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * The character encoding of the linked resource. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public String getCharset();
+    /**
+     * The character encoding of the linked resource. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public void setCharset(String charset);
+
+    /**
+     * Comma-separated list of lengths, defining an active region geometry. 
+     * See also <code>shape</code> for the shape of the region. See the 
+     * coords attribute definition in HTML 4.01.
+     */
+    public String getCoords();
+    /**
+     * Comma-separated list of lengths, defining an active region geometry. 
+     * See also <code>shape</code> for the shape of the region. See the 
+     * coords attribute definition in HTML 4.01.
+     */
+    public void setCoords(String coords);
+
+    /**
+     * The absolute URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute 
+     * definition in HTML 4.01.
+     */
+    public String getHref();
+    /**
+     * The absolute URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute 
+     * definition in HTML 4.01.
+     */
+    public void setHref(String href);
+
+    /**
+     * Language code of the linked resource. See the hreflang attribute 
+     * definition in HTML 4.01.
+     */
+    public String getHreflang();
+    /**
+     * Language code of the linked resource. See the hreflang attribute 
+     * definition in HTML 4.01.
+     */
+    public void setHreflang(String hreflang);
+
+    /**
+     * Anchor name. See the name attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Anchor name. See the name attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Forward link type. See the rel attribute definition in HTML 4.01.
+     */
+    public String getRel();
+    /**
+     * Forward link type. See the rel attribute definition in HTML 4.01.
+     */
+    public void setRel(String rel);
+
+    /**
+     * Reverse link type. See the rev attribute definition in HTML 4.01.
+     */
+    public String getRev();
+    /**
+     * Reverse link type. See the rev attribute definition in HTML 4.01.
+     */
+    public void setRev(String rev);
+
+    /**
+     * The shape of the active area. The coordinates are given by 
+     * <code>coords</code>. See the shape attribute definition in HTML 4.01.
+     */
+    public String getShape();
+    /**
+     * The shape of the active area. The coordinates are given by 
+     * <code>coords</code>. See the shape attribute definition in HTML 4.01.
+     */
+    public void setShape(String shape);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public String getTarget();
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public void setTarget(String target);
+
+    /**
+     * Advisory content type. See the type attribute definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Advisory content type. See the type attribute definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+    /**
+     * Removes keyboard focus from this element.
+     */
+    public void blur();
+
+    /**
+     * Gives keyboard focus to this element.
+     */
+    public void focus();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * An embedded Java applet. See the APPLET element definition in HTML 4.01. 
+ * This element is deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLAppletElement extends HTMLElement {
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getAlt();
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setAlt(String alt);
+
+    /**
+     * Comma-separated archive list. See the archive attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getArchive();
+    /**
+     * Comma-separated archive list. See the archive attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setArchive(String archive);
+
+    /**
+     * Applet class file. See the code attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getCode();
+    /**
+     * Applet class file. See the code attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setCode(String code);
+
+    /**
+     * Optional base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] for applet. See the codebase attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getCodeBase();
+    /**
+     * Optional base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] for applet. See the codebase attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCodeBase(String codeBase);
+
+    /**
+     * Override height. See the height attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getHeight();
+    /**
+     * Override height. See the height attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setHeight(String height);
+
+    /**
+     * Horizontal space, in pixels, to the left and right of this image, 
+     * applet, or object. See the hspace attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public int getHspace();
+    /**
+     * Horizontal space, in pixels, to the left and right of this image, 
+     * applet, or object. See the hspace attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setHspace(int hspace);
+
+    /**
+     * The name of the applet. See the name attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * The name of the applet. See the name attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * The value of the "object" attribute. See the object attribute definition
+     *  in HTML 4.01. This attribute is deprecated in HTML 4.01. 
+     * @version DOM Level 2
+     */
+    public String getObject();
+    /**
+     * The value of the "object" attribute. See the object attribute definition
+     *  in HTML 4.01. This attribute is deprecated in HTML 4.01. 
+     * @version DOM Level 2
+     */
+    public void setObject(String object);
+
+    /**
+     * Vertical space, in pixels, above and below this image, applet, or 
+     * object. See the vspace attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public int getVspace();
+    /**
+     * Vertical space, in pixels, above and below this image, applet, or 
+     * object. See the vspace attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setVspace(int vspace);
+
+    /**
+     * Override width. See the width attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Override width. See the width attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Client-side image map area definition. See the AREA element definition in 
+ * HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLAreaElement extends HTMLElement {
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public String getAlt();
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public void setAlt(String alt);
+
+    /**
+     * Comma-separated list of lengths, defining an active region geometry. 
+     * See also <code>shape</code> for the shape of the region. See the 
+     * coords attribute definition in HTML 4.01.
+     */
+    public String getCoords();
+    /**
+     * Comma-separated list of lengths, defining an active region geometry. 
+     * See also <code>shape</code> for the shape of the region. See the 
+     * coords attribute definition in HTML 4.01.
+     */
+    public void setCoords(String coords);
+
+    /**
+     * The URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute definition in 
+     * HTML 4.01.
+     */
+    public String getHref();
+    /**
+     * The URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute definition in 
+     * HTML 4.01.
+     */
+    public void setHref(String href);
+
+    /**
+     * Specifies that this area is inactive, i.e., has no associated action. 
+     * See the nohref attribute definition in HTML 4.01.
+     */
+    public boolean getNoHref();
+    /**
+     * Specifies that this area is inactive, i.e., has no associated action. 
+     * See the nohref attribute definition in HTML 4.01.
+     */
+    public void setNoHref(boolean noHref);
+
+    /**
+     * The shape of the active area. The coordinates are given by 
+     * <code>coords</code>. See the shape attribute definition in HTML 4.01.
+     */
+    public String getShape();
+    /**
+     * The shape of the active area. The coordinates are given by 
+     * <code>coords</code>. See the shape attribute definition in HTML 4.01.
+     */
+    public void setShape(String shape);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public String getTarget();
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public void setTarget(String target);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Force a line break. See the BR element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLBRElement extends HTMLElement {
+    /**
+     * Control flow of text around floats. See the clear attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getClear();
+    /**
+     * Control flow of text around floats. See the clear attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setClear(String clear);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Document base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. See the BASE element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLBaseElement extends HTMLElement {
+    /**
+     * The base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. See the href attribute definition in HTML 4.01.
+     */
+    public String getHref();
+    /**
+     * The base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. See the href attribute definition in HTML 4.01.
+     */
+    public void setHref(String href);
+
+    /**
+     * The default target frame. See the target attribute definition in HTML 
+     * 4.01.
+     */
+    public String getTarget();
+    /**
+     * The default target frame. See the target attribute definition in HTML 
+     * 4.01.
+     */
+    public void setTarget(String target);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Base font. See the BASEFONT element definition in HTML 4.01. This element 
+ * is deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLBaseFontElement extends HTMLElement {
+    /**
+     * Font color. See the color attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getColor();
+    /**
+     * Font color. See the color attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setColor(String color);
+
+    /**
+     * Font face identifier. See the face attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getFace();
+    /**
+     * Font face identifier. See the face attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setFace(String face);
+
+    /**
+     * Computed font size. See the size attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public int getSize();
+    /**
+     * Computed font size. See the size attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setSize(int size);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The HTML document body. This element is always present in the DOM API, even 
+ * if the tags are not present in the source document. See the BODY element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLBodyElement extends HTMLElement {
+    /**
+     * Color of active links (after mouse-button down, but before mouse-button 
+     * up). See the alink attribute definition in HTML 4.01. This attribute 
+     * is deprecated in HTML 4.01.
+     */
+    public String getALink();
+    /**
+     * Color of active links (after mouse-button down, but before mouse-button 
+     * up). See the alink attribute definition in HTML 4.01. This attribute 
+     * is deprecated in HTML 4.01.
+     */
+    public void setALink(String aLink);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the background texture tile image. See the background attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBackground();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the background texture tile image. See the background attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBackground(String background);
+
+    /**
+     * Document background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBgColor();
+    /**
+     * Document background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBgColor(String bgColor);
+
+    /**
+     * Color of links that are not active and unvisited. See the link 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public String getLink();
+    /**
+     * Color of links that are not active and unvisited. See the link 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public void setLink(String link);
+
+    /**
+     * Document text color. See the text attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getText();
+    /**
+     * Document text color. See the text attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setText(String text);
+
+    /**
+     * Color of links that have been visited by the user. See the vlink 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public String getVLink();
+    /**
+     * Color of links that have been visited by the user. See the vlink 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public void setVLink(String vLink);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Push button. See the BUTTON element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLButtonElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * The type of button (all lower case). See the type attribute definition 
+     * in HTML 4.01.
+     */
+    public String getType();
+
+    /**
+     * The current form control value. See the value attribute definition in 
+     * HTML 4.01.
+     */
+    public String getValue();
+    /**
+     * The current form control value. See the value attribute definition in 
+     * HTML 4.01.
+     */
+    public void setValue(String value);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Node;
+
+/**
+ * An <code>HTMLCollection</code> is a list of nodes. An individual node may 
+ * be accessed by either ordinal index or the node's <code>name</code> or 
+ * <code>id</code> attributes. Collections in the HTML DOM are assumed to be 
+ * live meaning that they are automatically updated when the underlying 
+ * document is changed. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLCollection {
+    /**
+     * This attribute specifies the length or size of the list. 
+     */
+    public int getLength();
+
+    /**
+     * This method retrieves a node specified by ordinal index. Nodes are 
+     * numbered in tree order (depth-first traversal order).
+     * @param index The index of the node to be fetched. The index origin is 
+     *   <code>0</code>.
+     * @return The <code>Node</code> at the corresponding position upon 
+     *   success. A value of <code>null</code> is returned if the index is 
+     *   out of range. 
+     */
+    public Node item(int index);
+
+    /**
+     * This method retrieves a <code>Node</code> using a name. With [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>] 
+     * documents, it first searches for a <code>Node</code> with a matching 
+     * <code>id</code> attribute. If it doesn't find one, it then searches 
+     * for a <code>Node</code> with a matching <code>name</code> attribute, 
+     * but only on those elements that are allowed a name attribute. With [<a href='http://www.w3.org/TR/2002/REC-xhtml1-20020801'>XHTML 1.0</a>] 
+     * documents, this method only searches for <code>Nodes</code> with a 
+     * matching <code>id</code> attribute. This method is case insensitive 
+     * in HTML documents and case sensitive in XHTML documents.
+     * @param name The name of the <code>Node</code> to be fetched.
+     * @return The <code>Node</code> with a <code>name</code> or 
+     *   <code>id</code> attribute whose value corresponds to the specified 
+     *   string. Upon failure (e.g., no node with this name exists), returns 
+     *   <code>null</code>.
+     */
+    public Node namedItem(String name);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Definition list. See the DL element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLDListElement extends HTMLElement {
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getCompact();
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCompact(boolean compact);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Directory list. See the DIR element definition in HTML 4.01. This element 
+ * is deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLDirectoryElement extends HTMLElement {
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getCompact();
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCompact(boolean compact);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Generic block container. See the DIV element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLDivElement extends HTMLElement {
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.DOMException;
+
+/**
+ * An <code>HTMLDocument</code> is the root of the HTML hierarchy and holds 
+ * the entire content. Besides providing access to the hierarchy, it also 
+ * provides some convenience methods for accessing certain sets of 
+ * information from the document.
+ * <p>The following properties have been deprecated in favor of the 
+ * corresponding ones for the <code>BODY</code> element:alinkColorbackground
+ * bgColorfgColorlinkColorvlinkColorIn DOM Level 2, the method 
+ * <code>getElementById</code> is inherited from the <code>Document</code> 
+ * interface where it was moved to.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLDocument extends Document {
+    /**
+     * The title of a document as specified by the <code>TITLE</code> element 
+     * in the head of the document. 
+     */
+    public String getTitle();
+    /**
+     * The title of a document as specified by the <code>TITLE</code> element 
+     * in the head of the document. 
+     */
+    public void setTitle(String title);
+
+    /**
+     * Returns the URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the page that linked to this page. The value is an 
+     * empty string if the user navigated to the page directly (not through 
+     * a link, but, for example, via a bookmark). 
+     */
+    public String getReferrer();
+
+    /**
+     * The domain name of the server that served the document, or 
+     * <code>null</code> if the server cannot be identified by a domain 
+     * name. 
+     */
+    public String getDomain();
+
+    /**
+     * The absolute URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the document. 
+     */
+    public String getURL();
+
+    /**
+     * The element that contains the content for the document. In documents 
+     * with <code>BODY</code> contents, returns the <code>BODY</code> 
+     * element. In frameset documents, this returns the outermost 
+     * <code>FRAMESET</code> element. 
+     */
+    public HTMLElement getBody();
+    /**
+     * The element that contains the content for the document. In documents 
+     * with <code>BODY</code> contents, returns the <code>BODY</code> 
+     * element. In frameset documents, this returns the outermost 
+     * <code>FRAMESET</code> element. 
+     */
+    public void setBody(HTMLElement body);
+
+    /**
+     * A collection of all the <code>IMG</code> elements in a document. The 
+     * behavior is limited to <code>IMG</code> elements for backwards 
+     * compatibility. As suggested by [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>], to include images, authors may use 
+     * the <code>OBJECT</code> element or the <code>IMG</code> element. 
+     * Therefore, it is recommended not to use this attribute to find the 
+     * images in the document but <code>getElementsByTagName</code> with 
+     * HTML 4.01 or <code>getElementsByTagNameNS</code> with XHTML 1.0.
+     */
+    public HTMLCollection getImages();
+
+    /**
+     * A collection of all the <code>OBJECT</code> elements that include 
+     * applets and <code>APPLET</code> (deprecated) elements in a document. 
+     */
+    public HTMLCollection getApplets();
+
+    /**
+     * A collection of all <code>AREA</code> elements and anchor (
+     * <code>A</code>) elements in a document with a value for the 
+     * <code>href</code> attribute. 
+     */
+    public HTMLCollection getLinks();
+
+    /**
+     * A collection of all the forms of a document. 
+     */
+    public HTMLCollection getForms();
+
+    /**
+     *  A collection of all the anchor (<code>A</code>) elements in a document 
+     * with a value for the <code>name</code> attribute. For reasons of 
+     * backward compatibility, the returned set of anchors only contains 
+     * those anchors created with the <code>name</code> attribute, not those 
+     * created with the <code>id</code> attribute. Note that in [<a href='http://www.w3.org/TR/2002/REC-xhtml1-20020801'>XHTML 1.0</a>], the 
+     * <code>name</code> attribute (see section 4.10) has no semantics and 
+     * is only present for legacy user agents: the <code>id</code> attribute 
+     * is used instead. Users should prefer the iterator mechanisms provided 
+     * by [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal</a>] instead. 
+     */
+    public HTMLCollection getAnchors();
+
+    /**
+     *  This mutable string attribute denotes persistent state information 
+     * that (1) is associated with the current frame or document and (2) is 
+     * composed of information described by the <code>cookies</code> 
+     * non-terminal of [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>], Section 4.2.2. 
+     * <br> If no persistent state information is available for the current 
+     * frame or document document, then this property's value is an empty 
+     * string. 
+     * <br> When this attribute is read, all cookies are returned as a single 
+     * string, with each cookie's name-value pair concatenated into a list 
+     * of name-value pairs, each list item being separated by a ';' 
+     * (semicolon). 
+     * <br> When this attribute is set, the value it is set to should be a 
+     * string that adheres to the <code>cookie</code> non-terminal of [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>]; that 
+     * is, it should be a single name-value pair followed by zero or more 
+     * cookie attribute values. If no domain attribute is specified, then 
+     * the domain attribute for the new value defaults to the host portion 
+     * of an absolute URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the current frame or document. If no path 
+     * attribute is specified, then the path attribute for the new value 
+     * defaults to the absolute path portion of the URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the current 
+     * frame or document. If no max-age attribute is specified, then the 
+     * max-age attribute for the new value defaults to a user agent defined 
+     * value. If a cookie with the specified name is already associated with 
+     * the current frame or document, then the new value as well as the new 
+     * attributes replace the old value and attributes. If a max-age 
+     * attribute of 0 is specified for the new value, then any existing 
+     * cookies of the specified name are removed from the cookie storage.  
+     * See [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>] for the semantics of persistent state item attribute value 
+     * pairs.  The precise nature of a user agent session is not defined by 
+     * this specification. 
+     */
+    public String getCookie();
+    /**
+     *  This mutable string attribute denotes persistent state information 
+     * that (1) is associated with the current frame or document and (2) is 
+     * composed of information described by the <code>cookies</code> 
+     * non-terminal of [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>], Section 4.2.2. 
+     * <br> If no persistent state information is available for the current 
+     * frame or document document, then this property's value is an empty 
+     * string. 
+     * <br> When this attribute is read, all cookies are returned as a single 
+     * string, with each cookie's name-value pair concatenated into a list 
+     * of name-value pairs, each list item being separated by a ';' 
+     * (semicolon). 
+     * <br> When this attribute is set, the value it is set to should be a 
+     * string that adheres to the <code>cookie</code> non-terminal of [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>]; that 
+     * is, it should be a single name-value pair followed by zero or more 
+     * cookie attribute values. If no domain attribute is specified, then 
+     * the domain attribute for the new value defaults to the host portion 
+     * of an absolute URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the current frame or document. If no path 
+     * attribute is specified, then the path attribute for the new value 
+     * defaults to the absolute path portion of the URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the current 
+     * frame or document. If no max-age attribute is specified, then the 
+     * max-age attribute for the new value defaults to a user agent defined 
+     * value. If a cookie with the specified name is already associated with 
+     * the current frame or document, then the new value as well as the new 
+     * attributes replace the old value and attributes. If a max-age 
+     * attribute of 0 is specified for the new value, then any existing 
+     * cookies of the specified name are removed from the cookie storage.  
+     * See [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>] for the semantics of persistent state item attribute value 
+     * pairs.  The precise nature of a user agent session is not defined by 
+     * this specification. 
+     * @exception DOMException
+     *    SYNTAX_ERR: If the new value does not adhere to the cookie syntax 
+     *   specified by [<a href='http://www.ietf.org/rfc/rfc2965.txt'>IETF RFC 2965</a>]. 
+     */
+    public void setCookie(String cookie)
+                                      throws DOMException;
+
+    /**
+     * Open a document stream for writing. If a document exists in the target, 
+     * this method clears it. This method and the ones following allow a 
+     * user to add to or replace the structure model of a document using 
+     * strings of unparsed HTML. At the time of writing alternate methods 
+     * for providing similar functionality for both HTML and XML documents 
+     * were being considered (see [<a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725'>DOM Level 3 Load and Save</a>]).
+     */
+    public void open();
+
+    /**
+     * Closes a document stream opened by <code>open()</code> and forces 
+     * rendering.
+     */
+    public void close();
+
+    /**
+     * Write a string of text to a document stream opened by 
+     * <code>open()</code>. Note that the function will produce a document 
+     * which is not necessarily driven by a DTD and therefore might be 
+     * produce an invalid result in the context of the document.
+     * @param text The string to be parsed into some structure in the 
+     *   document structure model.
+     */
+    public void write(String text);
+
+    /**
+     * Write a string of text followed by a newline character to a document 
+     * stream opened by <code>open()</code>. Note that the function will 
+     * produce a document which is not necessarily driven by a DTD and 
+     * therefore might be produce an invalid result in the context of the 
+     * document
+     * @param text The string to be parsed into some structure in the 
+     *   document structure model.
+     */
+    public void writeln(String text);
+
+    /**
+     *  With [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>] documents, this method returns the (possibly empty) collection 
+     * of elements whose <code>name</code> value is given by 
+     * <code>elementName</code>. In [<a href='http://www.w3.org/TR/2002/REC-xhtml1-20020801'>XHTML 1.0</a>] documents, this methods only return the 
+     * (possibly empty) collection of form controls with matching name. This 
+     * method is case sensitive. 
+     * @param elementName The <code>name</code> attribute value for an 
+     *   element.
+     * @return The matching elements.
+     */
+    public NodeList getElementsByName(String elementName);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Element;
+
+/**
+ *  All HTML element interfaces derive from this class. Elements that only 
+ * expose the HTML core attributes are represented by the base 
+ * <code>HTMLElement</code> interface. These elements are as follows: 
+ * special: SUB, SUP, SPAN, BDOfont: TT, I, B, U, S, STRIKE, BIG, SMALL
+ * phrase: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ACRONYM, ABBRlist: 
+ * DD, DTNOFRAMES, NOSCRIPTADDRESS, CENTERThe <code>style</code> attribute 
+ * of an HTML element is accessible through the 
+ * <code>ElementCSSInlineStyle</code> interface which is defined in the CSS 
+ * module [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>DOM Level 2 Style Sheets and CSS</a>]. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLElement extends Element {
+    /**
+     * The element's identifier. See the id attribute definition in HTML 4.01.
+     */
+    public String getId();
+    /**
+     * The element's identifier. See the id attribute definition in HTML 4.01.
+     */
+    public void setId(String id);
+
+    /**
+     * The element's advisory title. See the title attribute definition in 
+     * HTML 4.01.
+     */
+    public String getTitle();
+    /**
+     * The element's advisory title. See the title attribute definition in 
+     * HTML 4.01.
+     */
+    public void setTitle(String title);
+
+    /**
+     * Language code defined in RFC 1766. See the lang attribute definition in 
+     * HTML 4.01.
+     */
+    public String getLang();
+    /**
+     * Language code defined in RFC 1766. See the lang attribute definition in 
+     * HTML 4.01.
+     */
+    public void setLang(String lang);
+
+    /**
+     * Specifies the base direction of directionally neutral text and the 
+     * directionality of tables. See the dir attribute definition in HTML 
+     * 4.01.
+     */
+    public String getDir();
+    /**
+     * Specifies the base direction of directionally neutral text and the 
+     * directionality of tables. See the dir attribute definition in HTML 
+     * 4.01.
+     */
+    public void setDir(String dir);
+
+    /**
+     * The class attribute of the element. This attribute has been renamed due 
+     * to conflicts with the "class" keyword exposed by many languages. See 
+     * the class attribute definition in HTML 4.01.
+     */
+    public String getClassName();
+    /**
+     * The class attribute of the element. This attribute has been renamed due 
+     * to conflicts with the "class" keyword exposed by many languages. See 
+     * the class attribute definition in HTML 4.01.
+     */
+    public void setClassName(String className);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Organizes form controls into logical groups. See the FIELDSET element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLFieldSetElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Local change to font. See the FONT element definition in HTML 4.01. This 
+ * element is deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLFontElement extends HTMLElement {
+    /**
+     * Font color. See the color attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getColor();
+    /**
+     * Font color. See the color attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setColor(String color);
+
+    /**
+     * Font face identifier. See the face attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getFace();
+    /**
+     * Font face identifier. See the face attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setFace(String face);
+
+    /**
+     * Font size. See the size attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getSize();
+    /**
+     * Font size. See the size attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setSize(String size);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The <code>FORM</code> element encompasses behavior similar to a collection 
+ * and an element. It provides direct access to the contained form controls 
+ * as well as the attributes of the form element. See the FORM element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLFormElement extends HTMLElement {
+    /**
+     * Returns a collection of all form control elements in the form. 
+     */
+    public HTMLCollection getElements();
+
+    /**
+     * The number of form controls in the form.
+     */
+    public int getLength();
+
+    /**
+     * Names the form. 
+     */
+    public String getName();
+    /**
+     * Names the form. 
+     */
+    public void setName(String name);
+
+    /**
+     * List of character sets supported by the server. See the accept-charset 
+     * attribute definition in HTML 4.01.
+     */
+    public String getAcceptCharset();
+    /**
+     * List of character sets supported by the server. See the accept-charset 
+     * attribute definition in HTML 4.01.
+     */
+    public void setAcceptCharset(String acceptCharset);
+
+    /**
+     * Server-side form handler. See the action attribute definition in HTML 
+     * 4.01.
+     */
+    public String getAction();
+    /**
+     * Server-side form handler. See the action attribute definition in HTML 
+     * 4.01.
+     */
+    public void setAction(String action);
+
+    /**
+     * The content type of the submitted form, generally 
+     * "application/x-www-form-urlencoded". See the enctype attribute 
+     * definition in HTML 4.01. The onsubmit even handler is not guaranteed 
+     * to be triggered when invoking this method. The behavior is 
+     * inconsistent for historical reasons and authors should not rely on a 
+     * particular one. 
+     */
+    public String getEnctype();
+    /**
+     * The content type of the submitted form, generally 
+     * "application/x-www-form-urlencoded". See the enctype attribute 
+     * definition in HTML 4.01. The onsubmit even handler is not guaranteed 
+     * to be triggered when invoking this method. The behavior is 
+     * inconsistent for historical reasons and authors should not rely on a 
+     * particular one. 
+     */
+    public void setEnctype(String enctype);
+
+    /**
+     * HTTP method [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition 
+     * in HTML 4.01.
+     */
+    public String getMethod();
+    /**
+     * HTTP method [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition 
+     * in HTML 4.01.
+     */
+    public void setMethod(String method);
+
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public String getTarget();
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public void setTarget(String target);
+
+    /**
+     * Submits the form. It performs the same action as a submit button.
+     */
+    public void submit();
+
+    /**
+     * Restores a form element's default values. It performs the same action 
+     * as a reset button.
+     */
+    public void reset();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Document;
+
+/**
+ * Create a frame. See the FRAME element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLFrameElement extends HTMLElement {
+    /**
+     * Request frame borders. See the frameborder attribute definition in HTML 
+     * 4.01.
+     */
+    public String getFrameBorder();
+    /**
+     * Request frame borders. See the frameborder attribute definition in HTML 
+     * 4.01.
+     */
+    public void setFrameBorder(String frameBorder);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public String getLongDesc();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public void setLongDesc(String longDesc);
+
+    /**
+     * Frame margin height, in pixels. See the marginheight attribute 
+     * definition in HTML 4.01.
+     */
+    public String getMarginHeight();
+    /**
+     * Frame margin height, in pixels. See the marginheight attribute 
+     * definition in HTML 4.01.
+     */
+    public void setMarginHeight(String marginHeight);
+
+    /**
+     * Frame margin width, in pixels. See the marginwidth attribute definition 
+     * in HTML 4.01.
+     */
+    public String getMarginWidth();
+    /**
+     * Frame margin width, in pixels. See the marginwidth attribute definition 
+     * in HTML 4.01.
+     */
+    public void setMarginWidth(String marginWidth);
+
+    /**
+     * The frame name (object of the <code>target</code> attribute). See the 
+     * name attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * The frame name (object of the <code>target</code> attribute). See the 
+     * name attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * When true, forbid user from resizing frame. See the noresize attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getNoResize();
+    /**
+     * When true, forbid user from resizing frame. See the noresize attribute 
+     * definition in HTML 4.01.
+     */
+    public void setNoResize(boolean noResize);
+
+    /**
+     * Specify whether or not the frame should have scrollbars. See the 
+     * scrolling attribute definition in HTML 4.01.
+     */
+    public String getScrolling();
+    /**
+     * Specify whether or not the frame should have scrollbars. See the 
+     * scrolling attribute definition in HTML 4.01.
+     */
+    public void setScrolling(String scrolling);
+
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the initial frame contents. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public String getSrc();
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the initial frame contents. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public void setSrc(String src);
+
+    /**
+     * The document this frame contains, if there is any and it is available, 
+     * or <code>null</code> otherwise.
+     * @since DOM Level 2
+     */
+    public Document getContentDocument();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Create a grid of frames. See the FRAMESET element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLFrameSetElement extends HTMLElement {
+    /**
+     * The number of columns of frames in the frameset. See the cols attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCols();
+    /**
+     * The number of columns of frames in the frameset. See the cols attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCols(String cols);
+
+    /**
+     * The number of rows of frames in the frameset. See the rows attribute 
+     * definition in HTML 4.01.
+     */
+    public String getRows();
+    /**
+     * The number of rows of frames in the frameset. See the rows attribute 
+     * definition in HTML 4.01.
+     */
+    public void setRows(String rows);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Create a horizontal rule. See the HR element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLHRElement extends HTMLElement {
+    /**
+     * Align the rule on the page. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Align the rule on the page. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Indicates to the user agent that there should be no shading in the 
+     * rendering of this element. See the noshade attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getNoShade();
+    /**
+     * Indicates to the user agent that there should be no shading in the 
+     * rendering of this element. See the noshade attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setNoShade(boolean noShade);
+
+    /**
+     * The height of the rule. See the size attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getSize();
+    /**
+     * The height of the rule. See the size attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setSize(String size);
+
+    /**
+     * The width of the rule. See the width attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * The width of the rule. See the width attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Document head information. See the HEAD element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLHeadElement extends HTMLElement {
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a metadata profile. See the profile attribute 
+     * definition in HTML 4.01.
+     */
+    public String getProfile();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a metadata profile. See the profile attribute 
+     * definition in HTML 4.01.
+     */
+    public void setProfile(String profile);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * For the <code>H1</code> to <code>H6</code> elements. See the H1 element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLHeadingElement extends HTMLElement {
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Root of an HTML document. See the HTML element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLHtmlElement extends HTMLElement {
+    /**
+     * Version information about the document's DTD. See the version attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getVersion();
+    /**
+     * Version information about the document's DTD. See the version attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setVersion(String version);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Document;
+
+/**
+ * Inline subwindows. See the IFRAME element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLIFrameElement extends HTMLElement {
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Request frame borders. See the frameborder attribute definition in HTML 
+     * 4.01.
+     */
+    public String getFrameBorder();
+    /**
+     * Request frame borders. See the frameborder attribute definition in HTML 
+     * 4.01.
+     */
+    public void setFrameBorder(String frameBorder);
+
+    /**
+     * Frame height. See the height attribute definition in HTML 4.01.
+     */
+    public String getHeight();
+    /**
+     * Frame height. See the height attribute definition in HTML 4.01.
+     */
+    public void setHeight(String height);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public String getLongDesc();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public void setLongDesc(String longDesc);
+
+    /**
+     * Frame margin height, in pixels. See the marginheight attribute 
+     * definition in HTML 4.01.
+     */
+    public String getMarginHeight();
+    /**
+     * Frame margin height, in pixels. See the marginheight attribute 
+     * definition in HTML 4.01.
+     */
+    public void setMarginHeight(String marginHeight);
+
+    /**
+     * Frame margin width, in pixels. See the marginwidth attribute definition 
+     * in HTML 4.01.
+     */
+    public String getMarginWidth();
+    /**
+     * Frame margin width, in pixels. See the marginwidth attribute definition 
+     * in HTML 4.01.
+     */
+    public void setMarginWidth(String marginWidth);
+
+    /**
+     * The frame name (object of the <code>target</code> attribute). See the 
+     * name attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * The frame name (object of the <code>target</code> attribute). See the 
+     * name attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Specify whether or not the frame should have scrollbars. See the 
+     * scrolling attribute definition in HTML 4.01.
+     */
+    public String getScrolling();
+    /**
+     * Specify whether or not the frame should have scrollbars. See the 
+     * scrolling attribute definition in HTML 4.01.
+     */
+    public void setScrolling(String scrolling);
+
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the initial frame contents. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public String getSrc();
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the initial frame contents. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public void setSrc(String src);
+
+    /**
+     * Frame width. See the width attribute definition in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Frame width. See the width attribute definition in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+    /**
+     * The document this frame contains, if there is any and it is available, 
+     * or <code>null</code> otherwise.
+     * @since DOM Level 2
+     */
+    public Document getContentDocument();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Embedded image. See the IMG element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLImageElement extends HTMLElement {
+    /**
+     * The name of the element (for backwards compatibility). 
+     */
+    public String getName();
+    /**
+     * The name of the element (for backwards compatibility). 
+     */
+    public void setName(String name);
+
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public String getAlt();
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public void setAlt(String alt);
+
+    /**
+     * Width of border around image. See the  border attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the 
+     * type of this attribute was <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>]
+     * .
+     */
+    public String getBorder();
+    /**
+     * Width of border around image. See the  border attribute definition in 
+     * HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the 
+     * type of this attribute was <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>]
+     * .
+     */
+    public void setBorder(String border);
+
+    /**
+     * Height of the image in pixels. See the height attribute definition in 
+     * HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public int getHeight();
+    /**
+     * Height of the image in pixels. See the height attribute definition in 
+     * HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public void setHeight(int height);
+
+    /**
+     * Horizontal space to the left and right of this image in pixels. See the 
+     * hspace attribute definition in HTML 4.01. This attribute is 
+     * deprecated in HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public int getHspace();
+    /**
+     * Horizontal space to the left and right of this image in pixels. See the 
+     * hspace attribute definition in HTML 4.01. This attribute is 
+     * deprecated in HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public void setHspace(int hspace);
+
+    /**
+     * Use server-side image map. See the ismap attribute definition in HTML 
+     * 4.01.
+     */
+    public boolean getIsMap();
+    /**
+     * Use server-side image map. See the ismap attribute definition in HTML 
+     * 4.01.
+     */
+    public void setIsMap(boolean isMap);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public String getLongDesc();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a long description of this image or frame. See the 
+     * longdesc attribute definition in HTML 4.01.
+     */
+    public void setLongDesc(String longDesc);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the source of this image. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public String getSrc();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating the source of this image. See the src attribute 
+     * definition in HTML 4.01.
+     */
+    public void setSrc(String src);
+
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public String getUseMap();
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public void setUseMap(String useMap);
+
+    /**
+     * Vertical space above and below this image in pixels. See the vspace 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01. Note that the type of this attribute was "DOMString" in 
+     * DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public int getVspace();
+    /**
+     * Vertical space above and below this image in pixels. See the vspace 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01. Note that the type of this attribute was "DOMString" in 
+     * DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public void setVspace(int vspace);
+
+    /**
+     * The width of the image in pixels. See the width attribute definition in 
+     * HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public int getWidth();
+    /**
+     * The width of the image in pixels. See the width attribute definition in 
+     * HTML 4.01. Note that the type of this attribute was 
+     * <code>DOMString</code> in DOM Level 1 HTML [<a href='http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001'>DOM Level 1</a>].
+     * @version DOM Level 2
+     */
+    public void setWidth(int width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,303 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Form control.Depending upon the environment in which the page is being 
+ * viewed, the value property may be read-only for the file upload input 
+ * type. For the "password" input type, the actual value returned may be 
+ * masked to prevent unauthorized use. See the INPUT element definition in [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>].
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLInputElement extends HTMLElement {
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "text", "file" or "password", this represents the HTML value 
+     * attribute of the element. The value of this attribute does not change 
+     * if the contents of the corresponding form control, in an interactive 
+     * user agent, changes. See the value attribute definition in HTML 4.01.
+     */
+    public String getDefaultValue();
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "text", "file" or "password", this represents the HTML value 
+     * attribute of the element. The value of this attribute does not change 
+     * if the contents of the corresponding form control, in an interactive 
+     * user agent, changes. See the value attribute definition in HTML 4.01.
+     */
+    public void setDefaultValue(String defaultValue);
+
+    /**
+     * When <code>type</code> has the value "radio" or "checkbox", this 
+     * represents the HTML checked attribute of the element. The value of 
+     * this attribute does not change if the state of the corresponding form 
+     * control, in an interactive user agent, changes. See the checked 
+     * attribute definition in HTML 4.01.
+     */
+    public boolean getDefaultChecked();
+    /**
+     * When <code>type</code> has the value "radio" or "checkbox", this 
+     * represents the HTML checked attribute of the element. The value of 
+     * this attribute does not change if the state of the corresponding form 
+     * control, in an interactive user agent, changes. See the checked 
+     * attribute definition in HTML 4.01.
+     */
+    public void setDefaultChecked(boolean defaultChecked);
+
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * A comma-separated list of content types that a server processing this 
+     * form will handle correctly. See the accept attribute definition in 
+     * HTML 4.01.
+     */
+    public String getAccept();
+    /**
+     * A comma-separated list of content types that a server processing this 
+     * form will handle correctly. See the accept attribute definition in 
+     * HTML 4.01.
+     */
+    public void setAccept(String accept);
+
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public String getAlt();
+    /**
+     * Alternate text for user agents not rendering the normal content of this 
+     * element. See the alt attribute definition in HTML 4.01.
+     */
+    public void setAlt(String alt);
+
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "radio" or "checkbox", this represents the current state of the form 
+     * control, in an interactive user agent. Changes to this attribute 
+     * change the state of the form control, but do not change the value of 
+     * the HTML checked attribute of the INPUT element.During the handling 
+     * of a click event on an input element with a type attribute that has 
+     * the value "radio" or "checkbox", some implementations may change the 
+     * value of this property before the event is being dispatched in the 
+     * document. If the default action of the event is canceled, the value 
+     * of the property may be changed back to its original value. This means 
+     * that the value of this property during the handling of click events 
+     * is implementation dependent.
+     */
+    public boolean getChecked();
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "radio" or "checkbox", this represents the current state of the form 
+     * control, in an interactive user agent. Changes to this attribute 
+     * change the state of the form control, but do not change the value of 
+     * the HTML checked attribute of the INPUT element.During the handling 
+     * of a click event on an input element with a type attribute that has 
+     * the value "radio" or "checkbox", some implementations may change the 
+     * value of this property before the event is being dispatched in the 
+     * document. If the default action of the event is canceled, the value 
+     * of the property may be changed back to its original value. This means 
+     * that the value of this property during the handling of click events 
+     * is implementation dependent.
+     */
+    public void setChecked(boolean checked);
+
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Maximum number of characters for text fields, when <code>type</code> 
+     * has the value "text" or "password". See the maxlength attribute 
+     * definition in HTML 4.01.
+     */
+    public int getMaxLength();
+    /**
+     * Maximum number of characters for text fields, when <code>type</code> 
+     * has the value "text" or "password". See the maxlength attribute 
+     * definition in HTML 4.01.
+     */
+    public void setMaxLength(int maxLength);
+
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * This control is read-only. Relevant only when <code>type</code> has the 
+     * value "text" or "password". See the readonly attribute definition in 
+     * HTML 4.01.
+     */
+    public boolean getReadOnly();
+    /**
+     * This control is read-only. Relevant only when <code>type</code> has the 
+     * value "text" or "password". See the readonly attribute definition in 
+     * HTML 4.01.
+     */
+    public void setReadOnly(boolean readOnly);
+
+    /**
+     * Size information. The precise meaning is specific to each type of 
+     * field. See the size attribute definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public int getSize();
+    /**
+     * Size information. The precise meaning is specific to each type of 
+     * field. See the size attribute definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setSize(int size);
+
+    /**
+     * When the <code>type</code> attribute has the value "image", this 
+     * attribute specifies the location of the image to be used to decorate 
+     * the graphical submit button. See the src attribute definition in HTML 
+     * 4.01.
+     */
+    public String getSrc();
+    /**
+     * When the <code>type</code> attribute has the value "image", this 
+     * attribute specifies the location of the image to be used to decorate 
+     * the graphical submit button. See the src attribute definition in HTML 
+     * 4.01.
+     */
+    public void setSrc(String src);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * The type of control created (all lower case). See the type attribute 
+     * definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public String getType();
+    /**
+     * The type of control created (all lower case). See the type attribute 
+     * definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setType(String type);
+
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public String getUseMap();
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public void setUseMap(String useMap);
+
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "text", "file" or "password", this represents the current contents of 
+     * the corresponding form control, in an interactive user agent. 
+     * Changing this attribute changes the contents of the form control, but 
+     * does not change the value of the HTML value attribute of the element. 
+     * When the <code>type</code> attribute of the element has the value 
+     * "button", "hidden", "submit", "reset", "image", "checkbox" or 
+     * "radio", this represents the HTML value attribute of the element. See 
+     * the value attribute definition in HTML 4.01.
+     */
+    public String getValue();
+    /**
+     * When the <code>type</code> attribute of the element has the value 
+     * "text", "file" or "password", this represents the current contents of 
+     * the corresponding form control, in an interactive user agent. 
+     * Changing this attribute changes the contents of the form control, but 
+     * does not change the value of the HTML value attribute of the element. 
+     * When the <code>type</code> attribute of the element has the value 
+     * "button", "hidden", "submit", "reset", "image", "checkbox" or 
+     * "radio", this represents the HTML value attribute of the element. See 
+     * the value attribute definition in HTML 4.01.
+     */
+    public void setValue(String value);
+
+    /**
+     * Removes keyboard focus from this element.
+     */
+    public void blur();
+
+    /**
+     * Gives keyboard focus to this element.
+     */
+    public void focus();
+
+    /**
+     * Select the contents of the text area. For <code>INPUT</code> elements 
+     * whose <code>type</code> attribute has one of the following values: 
+     * "text", "file", or "password".
+     */
+    public void select();
+
+    /**
+     * Simulate a mouse-click. For <code>INPUT</code> elements whose 
+     * <code>type</code> attribute has one of the following values: 
+     * "button", "checkbox", "radio", "reset", or "submit".
+     */
+    public void click();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * This element is used for single-line text input. See the ISINDEX element 
+ * definition in HTML 4.01. This element is deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLIsIndexElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * The prompt message. See the prompt attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getPrompt();
+    /**
+     * The prompt message. See the prompt attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setPrompt(String prompt);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * List item. See the LI element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLLIElement extends HTMLElement {
+    /**
+     * List item bullet style. See the type attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * List item bullet style. See the type attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setType(String type);
+
+    /**
+     * Reset sequence number when used in <code>OL</code>. See the value 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public int getValue();
+    /**
+     * Reset sequence number when used in <code>OL</code>. See the value 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public void setValue(int value);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Form field label text. See the LABEL element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLLabelElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * This attribute links this label with another form control by 
+     * <code>id</code> attribute. See the for attribute definition in HTML 
+     * 4.01.
+     */
+    public String getHtmlFor();
+    /**
+     * This attribute links this label with another form control by 
+     * <code>id</code> attribute. See the for attribute definition in HTML 
+     * 4.01.
+     */
+    public void setHtmlFor(String htmlFor);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Provides a caption for a <code>FIELDSET</code> grouping. See the LEGEND 
+ * element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLLegendElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * Text alignment relative to <code>FIELDSET</code>. See the align 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Text alignment relative to <code>FIELDSET</code>. See the align 
+     * attribute definition in HTML 4.01. This attribute is deprecated in 
+     * HTML 4.01.
+     */
+    public void setAlign(String align);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The <code>LINK</code> element specifies a link to an external resource, and 
+ * defines this document's relationship to that resource (or vice versa). 
+ * See the LINK element definition in HTML 4.01 (see also the 
+ * <code>LinkStyle</code> interface in the StyleSheet module [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>DOM Level 2 Style Sheets and CSS</a>]).
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLLinkElement extends HTMLElement {
+    /**
+     * Enables/disables the link. This is currently only used for style sheet 
+     * links, and may be used to activate or deactivate style sheets. 
+     */
+    public boolean getDisabled();
+    /**
+     * Enables/disables the link. This is currently only used for style sheet 
+     * links, and may be used to activate or deactivate style sheets. 
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * The character encoding of the resource being linked to. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public String getCharset();
+    /**
+     * The character encoding of the resource being linked to. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public void setCharset(String charset);
+
+    /**
+     * The URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute definition in 
+     * HTML 4.01.
+     */
+    public String getHref();
+    /**
+     * The URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] of the linked resource. See the href attribute definition in 
+     * HTML 4.01.
+     */
+    public void setHref(String href);
+
+    /**
+     * Language code of the linked resource. See the hreflang attribute 
+     * definition in HTML 4.01.
+     */
+    public String getHreflang();
+    /**
+     * Language code of the linked resource. See the hreflang attribute 
+     * definition in HTML 4.01.
+     */
+    public void setHreflang(String hreflang);
+
+    /**
+     * Designed for use with one or more target media. See the media attribute 
+     * definition in HTML 4.01.
+     */
+    public String getMedia();
+    /**
+     * Designed for use with one or more target media. See the media attribute 
+     * definition in HTML 4.01.
+     */
+    public void setMedia(String media);
+
+    /**
+     * Forward link type. See the rel attribute definition in HTML 4.01.
+     */
+    public String getRel();
+    /**
+     * Forward link type. See the rel attribute definition in HTML 4.01.
+     */
+    public void setRel(String rel);
+
+    /**
+     * Reverse link type. See the rev attribute definition in HTML 4.01.
+     */
+    public String getRev();
+    /**
+     * Reverse link type. See the rev attribute definition in HTML 4.01.
+     */
+    public void setRev(String rev);
+
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public String getTarget();
+    /**
+     * Frame to render the resource in. See the target attribute definition in 
+     * HTML 4.01.
+     */
+    public void setTarget(String target);
+
+    /**
+     * Advisory content type. See the type attribute definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Advisory content type. See the type attribute definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Client-side image map. See the MAP element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLMapElement extends HTMLElement {
+    /**
+     * The list of areas defined for the image map. 
+     */
+    public HTMLCollection getAreas();
+
+    /**
+     * Names the map (for use with <code>usemap</code>). See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Names the map (for use with <code>usemap</code>). See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Menu list. See the MENU element definition in HTML 4.01. This element is 
+ * deprecated in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLMenuElement extends HTMLElement {
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getCompact();
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCompact(boolean compact);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * This contains generic meta-information about the document. See the META 
+ * element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLMetaElement extends HTMLElement {
+    /**
+     * Associated information. See the content attribute definition in HTML 
+     * 4.01.
+     */
+    public String getContent();
+    /**
+     * Associated information. See the content attribute definition in HTML 
+     * 4.01.
+     */
+    public void setContent(String content);
+
+    /**
+     * HTTP response header name [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>]. See the http-equiv attribute definition in 
+     * HTML 4.01.
+     */
+    public String getHttpEquiv();
+    /**
+     * HTTP response header name [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>]. See the http-equiv attribute definition in 
+     * HTML 4.01.
+     */
+    public void setHttpEquiv(String httpEquiv);
+
+    /**
+     * Meta information name. See the name attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Meta information name. See the name attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Select form of content. See the scheme attribute definition in HTML 
+     * 4.01.
+     */
+    public String getScheme();
+    /**
+     * Select form of content. See the scheme attribute definition in HTML 
+     * 4.01.
+     */
+    public void setScheme(String scheme);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Notice of modification to part of a document. See the INS and DEL element 
+ * definitions in HTML 4.01. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLModElement extends HTMLElement {
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a document that describes the reason for the change. 
+     * See the cite attribute definition in HTML 4.01.
+     */
+    public String getCite();
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a document that describes the reason for the change. 
+     * See the cite attribute definition in HTML 4.01.
+     */
+    public void setCite(String cite);
+
+    /**
+     * The date and time of the change. See the datetime attribute definition 
+     * in HTML 4.01.
+     */
+    public String getDateTime();
+    /**
+     * The date and time of the change. See the datetime attribute definition 
+     * in HTML 4.01.
+     */
+    public void setDateTime(String dateTime);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Ordered list. See the OL element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLOListElement extends HTMLElement {
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getCompact();
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCompact(boolean compact);
+
+    /**
+     * Starting sequence number. See the start attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public int getStart();
+    /**
+     * Starting sequence number. See the start attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setStart(int start);
+
+    /**
+     * Numbering style. See the type attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Numbering style. See the type attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setType(String type);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Document;
+
+/**
+ * Generic embedded object.In principle, all properties on the object element 
+ * are read-write but in some environments some properties may be read-only 
+ * once the underlying object is instantiated. See the OBJECT element 
+ * definition in [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>].
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLObjectElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * Applet class file. See the <code>code</code> attribute for 
+     * HTMLAppletElement. 
+     */
+    public String getCode();
+    /**
+     * Applet class file. See the <code>code</code> attribute for 
+     * HTMLAppletElement. 
+     */
+    public void setCode(String code);
+
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Aligns this object (vertically or horizontally) with respect to its 
+     * surrounding text. See the align attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Space-separated list of archives. See the archive attribute definition 
+     * in HTML 4.01.
+     */
+    public String getArchive();
+    /**
+     * Space-separated list of archives. See the archive attribute definition 
+     * in HTML 4.01.
+     */
+    public void setArchive(String archive);
+
+    /**
+     * Width of border around the object. See the border attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBorder();
+    /**
+     * Width of border around the object. See the border attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBorder(String border);
+
+    /**
+     * Base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] for <code>classid</code>, <code>data</code>, and 
+     * <code>archive</code> attributes. See the codebase attribute definition
+     *  in HTML 4.01.
+     */
+    public String getCodeBase();
+    /**
+     * Base URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] for <code>classid</code>, <code>data</code>, and 
+     * <code>archive</code> attributes. See the codebase attribute definition
+     *  in HTML 4.01.
+     */
+    public void setCodeBase(String codeBase);
+
+    /**
+     * Content type for data downloaded via <code>classid</code> attribute. 
+     * See the codetype attribute definition in HTML 4.01.
+     */
+    public String getCodeType();
+    /**
+     * Content type for data downloaded via <code>classid</code> attribute. 
+     * See the codetype attribute definition in HTML 4.01.
+     */
+    public void setCodeType(String codeType);
+
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] specifying the location of the object's data. See the data 
+     * attribute definition in HTML 4.01.
+     */
+    public String getData();
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] specifying the location of the object's data. See the data 
+     * attribute definition in HTML 4.01.
+     */
+    public void setData(String data);
+
+    /**
+     * Declare (for future reference), but do not instantiate, this object. 
+     * See the declare attribute definition in HTML 4.01.
+     */
+    public boolean getDeclare();
+    /**
+     * Declare (for future reference), but do not instantiate, this object. 
+     * See the declare attribute definition in HTML 4.01.
+     */
+    public void setDeclare(boolean declare);
+
+    /**
+     * Override height. See the height attribute definition in HTML 4.01.
+     */
+    public String getHeight();
+    /**
+     * Override height. See the height attribute definition in HTML 4.01.
+     */
+    public void setHeight(String height);
+
+    /**
+     * Horizontal space, in pixels, to the left and right of this image, 
+     * applet, or object. See the hspace attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public int getHspace();
+    /**
+     * Horizontal space, in pixels, to the left and right of this image, 
+     * applet, or object. See the hspace attribute definition in HTML 4.01. 
+     * This attribute is deprecated in HTML 4.01.
+     */
+    public void setHspace(int hspace);
+
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Message to render while loading the object. See the standby attribute 
+     * definition in HTML 4.01.
+     */
+    public String getStandby();
+    /**
+     * Message to render while loading the object. See the standby attribute 
+     * definition in HTML 4.01.
+     */
+    public void setStandby(String standby);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * Content type for data downloaded via <code>data</code> attribute. See 
+     * the type attribute definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Content type for data downloaded via <code>data</code> attribute. See 
+     * the type attribute definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public String getUseMap();
+    /**
+     * Use client-side image map. See the usemap attribute definition in HTML 
+     * 4.01.
+     */
+    public void setUseMap(String useMap);
+
+    /**
+     * Vertical space, in pixels, above and below this image, applet, or 
+     * object. See the vspace attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public int getVspace();
+    /**
+     * Vertical space, in pixels, above and below this image, applet, or 
+     * object. See the vspace attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setVspace(int vspace);
+
+    /**
+     * Override width. See the width attribute definition in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Override width. See the width attribute definition in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+    /**
+     * The document this object contains, if there is any and it is available, 
+     * or <code>null</code> otherwise.
+     * @since DOM Level 2
+     */
+    public Document getContentDocument();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Group options together in logical subdivisions. See the OPTGROUP element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLOptGroupElement extends HTMLElement {
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Assigns a label to this option group. See the label attribute definition
+     *  in HTML 4.01.
+     */
+    public String getLabel();
+    /**
+     * Assigns a label to this option group. See the label attribute definition
+     *  in HTML 4.01.
+     */
+    public void setLabel(String label);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * A selectable choice. See the OPTION element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLOptionElement extends HTMLElement {
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * Represents the value of the HTML selected attribute. The value of this 
+     * attribute does not change if the state of the corresponding form 
+     * control, in an interactive user agent, changes. See the selected 
+     * attribute definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public boolean getDefaultSelected();
+    /**
+     * Represents the value of the HTML selected attribute. The value of this 
+     * attribute does not change if the state of the corresponding form 
+     * control, in an interactive user agent, changes. See the selected 
+     * attribute definition in HTML 4.01.
+     * @version DOM Level 2
+     */
+    public void setDefaultSelected(boolean defaultSelected);
+
+    /**
+     * The text contained within the option element. 
+     */
+    public String getText();
+
+    /**
+     * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
+     * , starting from 0.
+     * @version DOM Level 2
+     */
+    public int getIndex();
+
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Option label for use in hierarchical menus. See the label attribute 
+     * definition in HTML 4.01.
+     */
+    public String getLabel();
+    /**
+     * Option label for use in hierarchical menus. See the label attribute 
+     * definition in HTML 4.01.
+     */
+    public void setLabel(String label);
+
+    /**
+     * Represents the current state of the corresponding form control, in an 
+     * interactive user agent. Changing this attribute changes the state of 
+     * the form control, but does not change the value of the HTML selected 
+     * attribute of the element.
+     */
+    public boolean getSelected();
+    /**
+     * Represents the current state of the corresponding form control, in an 
+     * interactive user agent. Changing this attribute changes the state of 
+     * the form control, but does not change the value of the HTML selected 
+     * attribute of the element.
+     */
+    public void setSelected(boolean selected);
+
+    /**
+     * The current form control value. See the value attribute definition in 
+     * HTML 4.01.
+     */
+    public String getValue();
+    /**
+     * The current form control value. See the value attribute definition in 
+     * HTML 4.01.
+     */
+    public void setValue(String value);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ *  An <code>HTMLOptionsCollection</code> is a list of nodes representing HTML 
+ * option element. An individual node may be accessed by either ordinal 
+ * index or the node's <code>name</code> or <code>id</code> attributes.  
+ * Collections in the HTML DOM are assumed to be live meaning that they are 
+ * automatically updated when the underlying document is changed. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ * @since DOM Level 2
+ */
+public interface HTMLOptionsCollection {
+    /**
+     *  This attribute specifies the length or size of the list. 
+     */
+    public int getLength();
+    /**
+     *  This attribute specifies the length or size of the list. 
+     * @exception DOMException
+     *    NOT_SUPPORTED_ERR: if setting the length is not allowed by the 
+     *   implementation. 
+     */
+    public void setLength(int length)
+                          throws DOMException;
+
+    /**
+     *  This method retrieves a node specified by ordinal index. Nodes are 
+     * numbered in tree order (depth-first traversal order). 
+     * @param index The index of the node to be fetched. The index origin is 
+     *   0.
+     * @return The <code>Node</code> at the corresponding position upon 
+     *   success. A value of <code>null</code> is returned if the index is 
+     *   out of range. 
+     */
+    public Node item(int index);
+
+    /**
+     * This method retrieves a <code>Node</code> using a name. It first 
+     * searches for a <code>Node</code> with a matching <code>id</code> 
+     * attribute. If it doesn't find one, it then searches for a 
+     * <code>Node</code> with a matching <code>name</code> attribute, but 
+     * only on those elements that are allowed a name attribute. This method 
+     * is case insensitive in HTML documents and case sensitive in XHTML 
+     * documents.
+     * @param name The name of the <code>Node</code> to be fetched.
+     * @return The <code>Node</code> with a <code>name</code> or 
+     *   <code>id</code> attribute whose value corresponds to the specified 
+     *   string. Upon failure (e.g., no node with this name exists), returns 
+     *   <code>null</code>.
+     */
+    public Node namedItem(String name);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Paragraphs. See the P element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLParagraphElement extends HTMLElement {
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal text alignment. See the align attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Parameters fed to the <code>OBJECT</code> element. See the PARAM element 
+ * definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLParamElement extends HTMLElement {
+    /**
+     * The name of a run-time parameter. See the name attribute definition in 
+     * HTML 4.01.
+     */
+    public String getName();
+    /**
+     * The name of a run-time parameter. See the name attribute definition in 
+     * HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Content type for the <code>value</code> attribute when 
+     * <code>valuetype</code> has the value "ref". See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Content type for the <code>value</code> attribute when 
+     * <code>valuetype</code> has the value "ref". See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+    /**
+     * The value of a run-time parameter. See the value attribute definition 
+     * in HTML 4.01.
+     */
+    public String getValue();
+    /**
+     * The value of a run-time parameter. See the value attribute definition 
+     * in HTML 4.01.
+     */
+    public void setValue(String value);
+
+    /**
+     * Information about the meaning of the <code>value</code> attribute 
+     * value. See the valuetype attribute definition in HTML 4.01.
+     */
+    public String getValueType();
+    /**
+     * Information about the meaning of the <code>value</code> attribute 
+     * value. See the valuetype attribute definition in HTML 4.01.
+     */
+    public void setValueType(String valueType);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Preformatted text. See the PRE element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLPreElement extends HTMLElement {
+    /**
+     * Fixed width for content. See the width attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public int getWidth();
+    /**
+     * Fixed width for content. See the width attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setWidth(int width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * For the <code>Q</code> and <code>BLOCKQUOTE</code> elements. See the Q 
+ * element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLQuoteElement extends HTMLElement {
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a source document or message. See the cite attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCite();
+    /**
+     * A URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating a source document or message. See the cite attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCite(String cite);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Script statements. See the SCRIPT element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLScriptElement extends HTMLElement {
+    /**
+     * The script content of the element. 
+     */
+    public String getText();
+    /**
+     * The script content of the element. 
+     */
+    public void setText(String text);
+
+    /**
+     * Reserved for future use. 
+     */
+    public String getHtmlFor();
+    /**
+     * Reserved for future use. 
+     */
+    public void setHtmlFor(String htmlFor);
+
+    /**
+     * Reserved for future use. 
+     */
+    public String getEvent();
+    /**
+     * Reserved for future use. 
+     */
+    public void setEvent(String event);
+
+    /**
+     * The character encoding of the linked resource. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public String getCharset();
+    /**
+     * The character encoding of the linked resource. See the charset 
+     * attribute definition in HTML 4.01.
+     */
+    public void setCharset(String charset);
+
+    /**
+     * Indicates that the user agent can defer processing of the script. See 
+     * the defer attribute definition in HTML 4.01.
+     */
+    public boolean getDefer();
+    /**
+     * Indicates that the user agent can defer processing of the script. See 
+     * the defer attribute definition in HTML 4.01.
+     */
+    public void setDefer(boolean defer);
+
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating an external script. See the src attribute definition 
+     * in HTML 4.01.
+     */
+    public String getSrc();
+    /**
+     * URI [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>] designating an external script. See the src attribute definition 
+     * in HTML 4.01.
+     */
+    public void setSrc(String src);
+
+    /**
+     * The content type of the script language. See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * The content type of the script language. See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.DOMException;
+
+/**
+ * The select element allows the selection of an option. The contained options 
+ * can be directly accessed through the select element as a collection. See 
+ * the SELECT element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLSelectElement extends HTMLElement {
+    /**
+     * The type of this form control. This is the string "select-multiple" 
+     * when the multiple attribute is <code>true</code> and the string 
+     * "select-one" when <code>false</code>.
+     */
+    public String getType();
+
+    /**
+     * The ordinal index of the selected option, starting from 0. The value -1 
+     * is returned if no element is selected. If multiple options are 
+     * selected, the index of the first selected option is returned. 
+     */
+    public int getSelectedIndex();
+    /**
+     * The ordinal index of the selected option, starting from 0. The value -1 
+     * is returned if no element is selected. If multiple options are 
+     * selected, the index of the first selected option is returned. 
+     */
+    public void setSelectedIndex(int selectedIndex);
+
+    /**
+     *  The current form control value (i.e. the value of the currently 
+     * selected option), if multiple options are selected this is the value 
+     * of the first selected option. 
+     */
+    public String getValue();
+    /**
+     *  The current form control value (i.e. the value of the currently 
+     * selected option), if multiple options are selected this is the value 
+     * of the first selected option. 
+     */
+    public void setValue(String value);
+
+    /**
+     *  The number of options in this <code>SELECT</code>. 
+     * @version DOM Level 2
+     */
+    public int getLength();
+    /**
+     *  The number of options in this <code>SELECT</code>. 
+     * @exception DOMException
+     *    NOT_SUPPORTED_ERR: if setting the length is not allowed by the 
+     *   implementation. 
+     * @version DOM Level 2
+     */
+    public void setLength(int length)
+                      throws DOMException;
+
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * The collection of <code>OPTION</code> elements contained by this 
+     * element. 
+     * @version DOM Level 2
+     */
+    public HTMLOptionsCollection getOptions();
+
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * If true, multiple <code>OPTION</code> elements may be selected in this 
+     * <code>SELECT</code>. See the multiple attribute definition in HTML 
+     * 4.01.
+     */
+    public boolean getMultiple();
+    /**
+     * If true, multiple <code>OPTION</code> elements may be selected in this 
+     * <code>SELECT</code>. See the multiple attribute definition in HTML 
+     * 4.01.
+     */
+    public void setMultiple(boolean multiple);
+
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * Number of visible rows. See the size attribute definition in HTML 4.01.
+     */
+    public int getSize();
+    /**
+     * Number of visible rows. See the size attribute definition in HTML 4.01.
+     */
+    public void setSize(int size);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * Add a new element to the collection of <code>OPTION</code> elements for 
+     * this <code>SELECT</code>. This method is the equivalent of the 
+     * <code>appendChild</code> method of the <code>Node</code> interface if 
+     * the <code>before</code> parameter is <code>null</code>. It is 
+     * equivalent to the <code>insertBefore</code> method on the parent of 
+     * <code>before</code> in all other cases. This method may have no 
+     * effect if the new element is not an <code>OPTION</code> or an 
+     * <code>OPTGROUP</code>.
+     * @param element The element to add.
+     * @param before The element to insert before, or <code>null</code> for 
+     *   the tail of the list.
+     * @exception DOMException
+     *   NOT_FOUND_ERR: Raised if <code>before</code> is not a descendant of 
+     *   the <code>SELECT</code> element. 
+     */
+    public void add(HTMLElement element, 
+                    HTMLElement before)
+                    throws DOMException;
+
+    /**
+     * Remove an element from the collection of <code>OPTION</code> elements 
+     * for this <code>SELECT</code>. Does nothing if no element has the 
+     * given index.
+     * @param index The index of the item to remove, starting from 0.
+     */
+    public void remove(int index);
+
+    /**
+     * Removes keyboard focus from this element.
+     */
+    public void blur();
+
+    /**
+     * Gives keyboard focus to this element.
+     */
+    public void focus();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ *  Style information. See the STYLE element definition in HTML 4.01, the CSS 
+ * module [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>DOM Level 2 Style Sheets and CSS</a>] and the <code>LinkStyle</code> interface in the StyleSheets 
+ * module [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>DOM Level 2 Style Sheets and CSS</a>]. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLStyleElement extends HTMLElement {
+    /**
+     * Enables/disables the style sheet. 
+     */
+    public boolean getDisabled();
+    /**
+     * Enables/disables the style sheet. 
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Designed for use with one or more target media. See the media attribute 
+     * definition in HTML 4.01.
+     */
+    public String getMedia();
+    /**
+     * Designed for use with one or more target media. See the media attribute 
+     * definition in HTML 4.01.
+     */
+    public void setMedia(String media);
+
+    /**
+     * The content type of the style sheet language. See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * The content type of the style sheet language. See the type attribute 
+     * definition in HTML 4.01.
+     */
+    public void setType(String type);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Table caption See the CAPTION element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableCaptionElement extends HTMLElement {
+    /**
+     * Caption alignment with respect to the table. See the align attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Caption alignment with respect to the table. See the align attribute 
+     * definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The object used to represent the <code>TH</code> and <code>TD</code> 
+ * elements. See the TD element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableCellElement extends HTMLElement {
+    /**
+     * The index of this cell in the row, starting from 0. This index is in 
+     * document tree order and not display order.
+     */
+    public int getCellIndex();
+
+    /**
+     * Abbreviation for header cells. See the abbr attribute definition in 
+     * HTML 4.01.
+     */
+    public String getAbbr();
+    /**
+     * Abbreviation for header cells. See the abbr attribute definition in 
+     * HTML 4.01.
+     */
+    public void setAbbr(String abbr);
+
+    /**
+     * Horizontal alignment of data in cell. See the align attribute definition
+     *  in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal alignment of data in cell. See the align attribute definition
+     *  in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Names group of related headers. See the axis attribute definition in 
+     * HTML 4.01.
+     */
+    public String getAxis();
+    /**
+     * Names group of related headers. See the axis attribute definition in 
+     * HTML 4.01.
+     */
+    public void setAxis(String axis);
+
+    /**
+     * Cell background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBgColor();
+    /**
+     * Cell background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBgColor(String bgColor);
+
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCh();
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCh(String ch);
+
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public String getChOff();
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public void setChOff(String chOff);
+
+    /**
+     * Number of columns spanned by cell. See the colspan attribute definition 
+     * in HTML 4.01.
+     */
+    public int getColSpan();
+    /**
+     * Number of columns spanned by cell. See the colspan attribute definition 
+     * in HTML 4.01.
+     */
+    public void setColSpan(int colSpan);
+
+    /**
+     * List of <code>id</code> attribute values for header cells. See the 
+     * headers attribute definition in HTML 4.01.
+     */
+    public String getHeaders();
+    /**
+     * List of <code>id</code> attribute values for header cells. See the 
+     * headers attribute definition in HTML 4.01.
+     */
+    public void setHeaders(String headers);
+
+    /**
+     * Cell height. See the height attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getHeight();
+    /**
+     * Cell height. See the height attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setHeight(String height);
+
+    /**
+     * Suppress word wrapping. See the nowrap attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getNoWrap();
+    /**
+     * Suppress word wrapping. See the nowrap attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setNoWrap(boolean noWrap);
+
+    /**
+     * Number of rows spanned by cell. See the rowspan attribute definition in 
+     * HTML 4.01.
+     */
+    public int getRowSpan();
+    /**
+     * Number of rows spanned by cell. See the rowspan attribute definition in 
+     * HTML 4.01.
+     */
+    public void setRowSpan(int rowSpan);
+
+    /**
+     * Scope covered by header cells. See the scope attribute definition in 
+     * HTML 4.01.
+     */
+    public String getScope();
+    /**
+     * Scope covered by header cells. See the scope attribute definition in 
+     * HTML 4.01.
+     */
+    public void setScope(String scope);
+
+    /**
+     * Vertical alignment of data in cell. See the valign attribute definition 
+     * in HTML 4.01.
+     */
+    public String getVAlign();
+    /**
+     * Vertical alignment of data in cell. See the valign attribute definition 
+     * in HTML 4.01.
+     */
+    public void setVAlign(String vAlign);
+
+    /**
+     * Cell width. See the width attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Cell width. See the width attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Regroups the <code>COL</code> and <code>COLGROUP</code> elements. See the 
+ * COL element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableColElement extends HTMLElement {
+    /**
+     * Horizontal alignment of cell data in column. See the align attribute 
+     * definition in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal alignment of cell data in column. See the align attribute 
+     * definition in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCh();
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCh(String ch);
+
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public String getChOff();
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public void setChOff(String chOff);
+
+    /**
+     * Indicates the number of columns in a group or affected by a grouping. 
+     * See the span attribute definition in HTML 4.01.
+     */
+    public int getSpan();
+    /**
+     * Indicates the number of columns in a group or affected by a grouping. 
+     * See the span attribute definition in HTML 4.01.
+     */
+    public void setSpan(int span);
+
+    /**
+     * Vertical alignment of cell data in column. See the valign attribute 
+     * definition in HTML 4.01.
+     */
+    public String getVAlign();
+    /**
+     * Vertical alignment of cell data in column. See the valign attribute 
+     * definition in HTML 4.01.
+     */
+    public void setVAlign(String vAlign);
+
+    /**
+     * Default column width. See the width attribute definition in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Default column width. See the width attribute definition in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.DOMException;
+
+/**
+ * The create* and delete* methods on the table allow authors to construct and 
+ * modify tables. [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>] specifies that only one of each of the 
+ * <code>CAPTION</code>, <code>THEAD</code>, and <code>TFOOT</code> elements 
+ * may exist in a table. Therefore, if one exists, and the createTHead() or 
+ * createTFoot() method is called, the method returns the existing THead or 
+ * TFoot element. See the TABLE element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableElement extends HTMLElement {
+    /**
+     * Returns the table's <code>CAPTION</code>, or void if none exists. 
+     * @version DOM Level 2
+     */
+    public HTMLTableCaptionElement getCaption();
+    /**
+     * Returns the table's <code>CAPTION</code>, or void if none exists. 
+     * @exception DOMException
+     *    HIERARCHY_REQUEST_ERR: if the element is not a <code>CAPTION</code>. 
+     * @version DOM Level 2
+     */
+    public void setCaption(HTMLTableCaptionElement caption)
+                          throws DOMException;
+
+    /**
+     * Returns the table's <code>THEAD</code>, or <code>null</code> if none 
+     * exists. 
+     * @version DOM Level 2
+     */
+    public HTMLTableSectionElement getTHead();
+    /**
+     * Returns the table's <code>THEAD</code>, or <code>null</code> if none 
+     * exists. 
+     * @exception DOMException
+     *    HIERARCHY_REQUEST_ERR: if the element is not a <code>THEAD</code>. 
+     * @version DOM Level 2
+     */
+    public void setTHead(HTMLTableSectionElement tHead)
+                          throws DOMException;
+
+    /**
+     * Returns the table's <code>TFOOT</code>, or <code>null</code> if none 
+     * exists. 
+     * @version DOM Level 2
+     */
+    public HTMLTableSectionElement getTFoot();
+    /**
+     * Returns the table's <code>TFOOT</code>, or <code>null</code> if none 
+     * exists. 
+     * @exception DOMException
+     *    HIERARCHY_REQUEST_ERR: if the element is not a <code>TFOOT</code>. 
+     * @version DOM Level 2
+     */
+    public void setTFoot(HTMLTableSectionElement tFoot)
+                          throws DOMException;
+
+    /**
+     * Returns a collection of all the rows in the table, including all in 
+     * <code>THEAD</code>, <code>TFOOT</code>, all <code>TBODY</code> 
+     * elements. 
+     */
+    public HTMLCollection getRows();
+
+    /**
+     * Returns a collection of the table bodies (including implicit ones).
+     */
+    public HTMLCollection getTBodies();
+
+    /**
+     * Specifies the table's position with respect to the rest of the 
+     * document. See the align attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Specifies the table's position with respect to the rest of the 
+     * document. See the align attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Cell background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBgColor();
+    /**
+     * Cell background color. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBgColor(String bgColor);
+
+    /**
+     * The width of the border around the table. See the border attribute 
+     * definition in HTML 4.01.
+     */
+    public String getBorder();
+    /**
+     * The width of the border around the table. See the border attribute 
+     * definition in HTML 4.01.
+     */
+    public void setBorder(String border);
+
+    /**
+     * Specifies the horizontal and vertical space between cell content and 
+     * cell borders. See the cellpadding attribute definition in HTML 4.01.
+     */
+    public String getCellPadding();
+    /**
+     * Specifies the horizontal and vertical space between cell content and 
+     * cell borders. See the cellpadding attribute definition in HTML 4.01.
+     */
+    public void setCellPadding(String cellPadding);
+
+    /**
+     * Specifies the horizontal and vertical separation between cells. See the 
+     * cellspacing attribute definition in HTML 4.01.
+     */
+    public String getCellSpacing();
+    /**
+     * Specifies the horizontal and vertical separation between cells. See the 
+     * cellspacing attribute definition in HTML 4.01.
+     */
+    public void setCellSpacing(String cellSpacing);
+
+    /**
+     * Specifies which external table borders to render. See the frame 
+     * attribute definition in HTML 4.01.
+     */
+    public String getFrame();
+    /**
+     * Specifies which external table borders to render. See the frame 
+     * attribute definition in HTML 4.01.
+     */
+    public void setFrame(String frame);
+
+    /**
+     * Specifies which internal table borders to render. See the rules 
+     * attribute definition in HTML 4.01.
+     */
+    public String getRules();
+    /**
+     * Specifies which internal table borders to render. See the rules 
+     * attribute definition in HTML 4.01.
+     */
+    public void setRules(String rules);
+
+    /**
+     * Description about the purpose or structure of a table. See the summary 
+     * attribute definition in HTML 4.01.
+     */
+    public String getSummary();
+    /**
+     * Description about the purpose or structure of a table. See the summary 
+     * attribute definition in HTML 4.01.
+     */
+    public void setSummary(String summary);
+
+    /**
+     * Specifies the desired table width. See the width attribute definition 
+     * in HTML 4.01.
+     */
+    public String getWidth();
+    /**
+     * Specifies the desired table width. See the width attribute definition 
+     * in HTML 4.01.
+     */
+    public void setWidth(String width);
+
+    /**
+     * Create a table header row or return an existing one.
+     * @return A new table header element (<code>THEAD</code>).
+     */
+    public HTMLElement createTHead();
+
+    /**
+     * Delete the header from the table, if one exists.
+     */
+    public void deleteTHead();
+
+    /**
+     * Create a table footer row or return an existing one.
+     * @return A footer element (<code>TFOOT</code>).
+     */
+    public HTMLElement createTFoot();
+
+    /**
+     * Delete the footer from the table, if one exists.
+     */
+    public void deleteTFoot();
+
+    /**
+     * Create a new table caption object or return an existing one.
+     * @return A <code>CAPTION</code> element.
+     */
+    public HTMLElement createCaption();
+
+    /**
+     * Delete the table caption, if one exists.
+     */
+    public void deleteCaption();
+
+    /**
+     * Insert a new empty row in the table. The new row is inserted 
+     * immediately before and in the same section as the current 
+     * <code>index</code>th row in the table. If <code>index</code> is -1 or 
+     * equal to the number of rows, the new row is appended. In addition, 
+     * when the table is empty the row is inserted into a <code>TBODY</code> 
+     * which is created and inserted into the table.A table row cannot be 
+     * empty according to [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>].
+     * @param index The row number where to insert a new row. This index 
+     *   starts from 0 and is relative to the logical order (not document 
+     *   order) of all the rows contained inside the table.
+     * @return The newly created row.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index is greater than the 
+     *   number of rows or if the index is a negative number other than -1.
+     * @version DOM Level 2
+     */
+    public HTMLElement insertRow(int index)
+                                 throws DOMException;
+
+    /**
+     * Delete a table row.
+     * @param index The index of the row to be deleted. This index starts 
+     *   from 0 and is relative to the logical order (not document order) of 
+     *   all the rows contained inside the table. If the index is -1 the 
+     *   last row in the table is deleted.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index is greater than or 
+     *   equal to the number of rows or if the index is a negative number 
+     *   other than -1.
+     * @version DOM Level 2
+     */
+    public void deleteRow(int index)
+                          throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.DOMException;
+
+/**
+ * A row in a table. See the TR element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableRowElement extends HTMLElement {
+    /**
+     * This is in logical order and not in document order. The 
+     * <code>rowIndex</code> does take into account sections (
+     * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>) within 
+     * the table, placing <code>THEAD</code> rows first in the index, 
+     * followed by <code>TBODY</code> rows, followed by <code>TFOOT</code> 
+     * rows.
+     * @version DOM Level 2
+     */
+    public int getRowIndex();
+
+    /**
+     * The index of this row, relative to the current section (
+     * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>), 
+     * starting from 0.
+     * @version DOM Level 2
+     */
+    public int getSectionRowIndex();
+
+    /**
+     * The collection of cells in this row. 
+     * @version DOM Level 2
+     */
+    public HTMLCollection getCells();
+
+    /**
+     * Horizontal alignment of data within cells of this row. See the align 
+     * attribute definition in HTML 4.01.
+     */
+    public String getAlign();
+    /**
+     * Horizontal alignment of data within cells of this row. See the align 
+     * attribute definition in HTML 4.01.
+     */
+    public void setAlign(String align);
+
+    /**
+     * Background color for rows. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public String getBgColor();
+    /**
+     * Background color for rows. See the bgcolor attribute definition in HTML 
+     * 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setBgColor(String bgColor);
+
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCh();
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCh(String ch);
+
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public String getChOff();
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public void setChOff(String chOff);
+
+    /**
+     * Vertical alignment of data within cells of this row. See the valign 
+     * attribute definition in HTML 4.01.
+     */
+    public String getVAlign();
+    /**
+     * Vertical alignment of data within cells of this row. See the valign 
+     * attribute definition in HTML 4.01.
+     */
+    public void setVAlign(String vAlign);
+
+    /**
+     * Insert an empty <code>TD</code> cell into this row. If 
+     * <code>index</code> is -1 or equal to the number of cells, the new 
+     * cell is appended.
+     * @param index The place to insert the cell, starting from 0.
+     * @return The newly created cell.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified <code>index</code> is greater 
+     *   than the number of cells or if the index is a negative number other 
+     *   than -1.
+     * @version DOM Level 2
+     */
+    public HTMLElement insertCell(int index)
+                                  throws DOMException;
+
+    /**
+     * Delete a cell from the current row.
+     * @param index The index of the cell to delete, starting from 0. If the 
+     *   index is -1 the last cell in the row is deleted.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified <code>index</code> is greater 
+     *   than or equal to the number of cells or if the index is a negative 
+     *   number other than -1.
+     * @version DOM Level 2
+     */
+    public void deleteCell(int index)
+                           throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+import org.w3c.dom.DOMException;
+
+/**
+ * The <code>THEAD</code>, <code>TFOOT</code>, and <code>TBODY</code> 
+ * elements. 
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTableSectionElement extends HTMLElement {
+    /**
+     * Horizontal alignment of data in cells. See the <code>align</code> 
+     * attribute for HTMLTheadElement for details. 
+     */
+    public String getAlign();
+    /**
+     * Horizontal alignment of data in cells. See the <code>align</code> 
+     * attribute for HTMLTheadElement for details. 
+     */
+    public void setAlign(String align);
+
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public String getCh();
+    /**
+     * Alignment character for cells in a column. See the char attribute 
+     * definition in HTML 4.01.
+     */
+    public void setCh(String ch);
+
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public String getChOff();
+    /**
+     * Offset of alignment character. See the charoff attribute definition in 
+     * HTML 4.01.
+     */
+    public void setChOff(String chOff);
+
+    /**
+     * Vertical alignment of data in cells. See the <code>valign</code> 
+     * attribute for HTMLTheadElement for details. 
+     */
+    public String getVAlign();
+    /**
+     * Vertical alignment of data in cells. See the <code>valign</code> 
+     * attribute for HTMLTheadElement for details. 
+     */
+    public void setVAlign(String vAlign);
+
+    /**
+     * The collection of rows in this table section. 
+     */
+    public HTMLCollection getRows();
+
+    /**
+     * Insert a row into this section. The new row is inserted immediately 
+     * before the current <code>index</code>th row in this section. If 
+     * <code>index</code> is -1 or equal to the number of rows in this 
+     * section, the new row is appended.
+     * @param index The row number where to insert a new row. This index 
+     *   starts from 0 and is relative only to the rows contained inside 
+     *   this section, not all the rows in the table.
+     * @return The newly created row.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index is greater than the 
+     *   number of rows of if the index is a negative number other than -1.
+     * @version DOM Level 2
+     */
+    public HTMLElement insertRow(int index)
+                                 throws DOMException;
+
+    /**
+     * Delete a row from this section.
+     * @param index The index of the row to be deleted, or -1 to delete the 
+     *   last row. This index starts from 0 and is relative only to the rows 
+     *   contained inside this section, not all the rows in the table.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if the specified index is greater than or 
+     *   equal to the number of rows or if the index is a negative number 
+     *   other than -1.
+     * @version DOM Level 2
+     */
+    public void deleteRow(int index)
+                          throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Multi-line text field. See the TEXTAREA element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTextAreaElement extends HTMLElement {
+    /**
+     * Represents the contents of the element. The value of this attribute 
+     * does not change if the contents of the corresponding form control, in 
+     * an interactive user agent, changes.
+     * @version DOM Level 2
+     */
+    public String getDefaultValue();
+    /**
+     * Represents the contents of the element. The value of this attribute 
+     * does not change if the contents of the corresponding form control, in 
+     * an interactive user agent, changes.
+     * @version DOM Level 2
+     */
+    public void setDefaultValue(String defaultValue);
+
+    /**
+     * Returns the <code>FORM</code> element containing this control. Returns 
+     * <code>null</code> if this control is not within the context of a 
+     * form. 
+     */
+    public HTMLFormElement getForm();
+
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public String getAccessKey();
+    /**
+     * A single character access key to give access to the form control. See 
+     * the accesskey attribute definition in HTML 4.01.
+     */
+    public void setAccessKey(String accessKey);
+
+    /**
+     * Width of control (in characters). See the cols attribute definition in 
+     * HTML 4.01.
+     */
+    public int getCols();
+    /**
+     * Width of control (in characters). See the cols attribute definition in 
+     * HTML 4.01.
+     */
+    public void setCols(int cols);
+
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public boolean getDisabled();
+    /**
+     * The control is unavailable in this context. See the disabled attribute 
+     * definition in HTML 4.01.
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public String getName();
+    /**
+     * Form control or object name when submitted with a form. See the name 
+     * attribute definition in HTML 4.01.
+     */
+    public void setName(String name);
+
+    /**
+     * This control is read-only. See the readonly attribute definition in 
+     * HTML 4.01.
+     */
+    public boolean getReadOnly();
+    /**
+     * This control is read-only. See the readonly attribute definition in 
+     * HTML 4.01.
+     */
+    public void setReadOnly(boolean readOnly);
+
+    /**
+     * Number of text rows. See the rows attribute definition in HTML 4.01.
+     */
+    public int getRows();
+    /**
+     * Number of text rows. See the rows attribute definition in HTML 4.01.
+     */
+    public void setRows(int rows);
+
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public int getTabIndex();
+    /**
+     * Index that represents the element's position in the tabbing order. See 
+     * the tabindex attribute definition in HTML 4.01.
+     */
+    public void setTabIndex(int tabIndex);
+
+    /**
+     * The type of this form control. This the string "textarea".
+     */
+    public String getType();
+
+    /**
+     * Represents the current contents of the corresponding form control, in 
+     * an interactive user agent. Changing this attribute changes the 
+     * contents of the form control, but does not change the contents of the 
+     * element. If the entirety of the data can not fit into a single 
+     * <code>DOMString</code>, the implementation may truncate the data.
+     */
+    public String getValue();
+    /**
+     * Represents the current contents of the corresponding form control, in 
+     * an interactive user agent. Changing this attribute changes the 
+     * contents of the form control, but does not change the contents of the 
+     * element. If the entirety of the data can not fit into a single 
+     * <code>DOMString</code>, the implementation may truncate the data.
+     */
+    public void setValue(String value);
+
+    /**
+     * Removes keyboard focus from this element.
+     */
+    public void blur();
+
+    /**
+     * Gives keyboard focus to this element.
+     */
+    public void focus();
+
+    /**
+     * Select the contents of the <code>TEXTAREA</code>.
+     */
+    public void select();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * The document title. See the TITLE element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLTitleElement extends HTMLElement {
+    /**
+     * The specified title as a string. 
+     */
+    public String getText();
+    /**
+     * The specified title as a string. 
+     */
+    public void setText(String text);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.html2;
+
+/**
+ * Unordered list. See the UL element definition in HTML 4.01.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
+ */
+public interface HTMLUListElement extends HTMLElement {
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public boolean getCompact();
+    /**
+     * Reduce spacing between list items. See the compact attribute definition 
+     * in HTML 4.01. This attribute is deprecated in HTML 4.01.
+     */
+    public void setCompact(boolean compact);
+
+    /**
+     * Bullet style. See the type attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public String getType();
+    /**
+     * Bullet style. See the type attribute definition in HTML 4.01. This 
+     * attribute is deprecated in HTML 4.01.
+     */
+    public void setType(String type);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  <code>DOMImplementationLS</code> contains the factory methods for creating 
+ * Load and Save objects. 
+ * <p> The expectation is that an instance of the 
+ * <code>DOMImplementationLS</code> interface can be obtained by using 
+ * binding-specific casting methods on an instance of the 
+ * <code>DOMImplementation</code> interface or, if the <code>Document</code> 
+ * supports the feature <code>"Core"</code> version <code>"3.0"</code> 
+ * defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , by using the method <code>DOMImplementation.getFeature</code> with 
+ * parameter values <code>"LS"</code> (or <code>"LS-Async"</code>) and 
+ * <code>"3.0"</code> (respectively). 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface DOMImplementationLS {
+    // DOMImplementationLSMode
+    /**
+     * Create a synchronous <code>LSParser</code>.
+     */
+    public static final short MODE_SYNCHRONOUS          = 1;
+    /**
+     * Create an asynchronous <code>LSParser</code>.
+     */
+    public static final short MODE_ASYNCHRONOUS         = 2;
+
+    /**
+     * Create a new <code>LSParser</code>. The newly constructed parser may 
+     * then be configured by means of its <code>DOMConfiguration</code> 
+     * object, and used to parse documents by means of its <code>parse</code>
+     *  method. 
+     * @param mode  The <code>mode</code> argument is either 
+     *   <code>MODE_SYNCHRONOUS</code> or <code>MODE_ASYNCHRONOUS</code>, if 
+     *   <code>mode</code> is <code>MODE_SYNCHRONOUS</code> then the 
+     *   <code>LSParser</code> that is created will operate in synchronous 
+     *   mode, if it's <code>MODE_ASYNCHRONOUS</code> then the 
+     *   <code>LSParser</code> that is created will operate in asynchronous 
+     *   mode. 
+     * @param schemaType  An absolute URI representing the type of the schema 
+     *   language used during the load of a <code>Document</code> using the 
+     *   newly created <code>LSParser</code>. Note that no lexical checking 
+     *   is done on the absolute URI. In order to create a 
+     *   <code>LSParser</code> for any kind of schema types (i.e. the 
+     *   LSParser will be free to use any schema found), use the value 
+     *   <code>null</code>. 
+     * <p ><b>Note:</b>    For W3C XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     *   , applications must use the value 
+     *   <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], 
+     *   applications must use the value 
+     *   <code>"http://www.w3.org/TR/REC-xml"</code>. Other Schema languages 
+     *   are outside the scope of the W3C and therefore should recommend an 
+     *   absolute URI in order to use this method. 
+     * @return  The newly created <code>LSParser</code> object. This 
+     *   <code>LSParser</code> is either synchronous or asynchronous 
+     *   depending on the value of the <code>mode</code> argument. 
+     * <p ><b>Note:</b>    By default, the newly created <code>LSParser</code> 
+     *   does not contain a <code>DOMErrorHandler</code>, i.e. the value of 
+     *   the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" configuration parameter is <code>null</code>. However, implementations 
+     *   may provide a default error handler at creation time. In that case, 
+     *   the initial value of the <code>"error-handler"</code> configuration 
+     *   parameter on the new <code>LSParser</code> object contains a 
+     *   reference to the default error handler. 
+     * @exception DOMException
+     *    NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is 
+     *   not supported. 
+     */
+    public LSParser createLSParser(short mode, 
+                                   String schemaType)
+                                   throws DOMException;
+
+    /**
+     *  Create a new <code>LSSerializer</code> object. 
+     * @return The newly created <code>LSSerializer</code> object.
+     * <p ><b>Note:</b>    By default, the newly created 
+     *   <code>LSSerializer</code> has no <code>DOMErrorHandler</code>, i.e. 
+     *   the value of the <code>"error-handler"</code> configuration 
+     *   parameter is <code>null</code>. However, implementations may 
+     *   provide a default error handler at creation time. In that case, the 
+     *   initial value of the <code>"error-handler"</code> configuration 
+     *   parameter on the new <code>LSSerializer</code> object contains a 
+     *   reference to the default error handler. 
+     */
+    public LSSerializer createLSSerializer();
+
+    /**
+     *  Create a new empty input source object where 
+     * <code>LSInput.characterStream</code>, <code>LSInput.byteStream</code>
+     * , <code>LSInput.stringData</code> <code>LSInput.systemId</code>, 
+     * <code>LSInput.publicId</code>, <code>LSInput.baseURI</code>, and 
+     * <code>LSInput.encoding</code> are null, and 
+     * <code>LSInput.certifiedText</code> is false. 
+     * @return  The newly created input object. 
+     */
+    public LSInput createLSInput();
+
+    /**
+     *  Create a new empty output destination object where 
+     * <code>LSOutput.characterStream</code>, 
+     * <code>LSOutput.byteStream</code>, <code>LSOutput.systemId</code>, 
+     * <code>LSOutput.encoding</code> are null. 
+     * @return  The newly created output object. 
+     */
+    public LSOutput createLSOutput();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+/**
+ *  Parser or write operations may throw an <code>LSException</code> if the 
+ * processing is stopped. The processing can be stopped due to a 
+ * <code>DOMError</code> with a severity of 
+ * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered 
+ * <code>DOMError.SEVERITY_ERROR</code>, or if 
+ * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>. 
+ * <p ><b>Note:</b>  As suggested in the definition of the constants in the 
+ * <code>DOMError</code> interface, a DOM implementation may choose to 
+ * continue after a fatal error, but the resulting DOM tree is then 
+ * implementation dependent. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public class LSException extends RuntimeException {
+    public LSException(short code, String message) {
+       super(message);
+       this.code = code;
+    }
+    public short   code;
+    // LSExceptionCode
+    /**
+     *  If an attempt was made to load a document, or an XML Fragment, using 
+     * <code>LSParser</code> and the processing has been stopped. 
+     */
+    public static final short PARSE_ERR                 = 81;
+    /**
+     *  If an attempt was made to serialize a <code>Node</code> using 
+     * <code>LSSerializer</code> and the processing has been stopped. 
+     */
+    public static final short SERIALIZE_ERR             = 82;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+/**
+ *  This interface represents an input source for data. 
+ * <p> This interface allows an application to encapsulate information about 
+ * an input source in a single object, which may include a public 
+ * identifier, a system identifier, a byte stream (possibly with a specified 
+ * encoding), a base URI, and/or a character stream. 
+ * <p> The exact definitions of a byte stream and a character stream are 
+ * binding dependent. 
+ * <p> The application is expected to provide objects that implement this 
+ * interface whenever such objects are needed. The application can either 
+ * provide its own objects that implement this interface, or it can use the 
+ * generic factory method <code>DOMImplementationLS.createLSInput()</code> 
+ * to create objects that implement this interface. 
+ * <p> The <code>LSParser</code> will use the <code>LSInput</code> object to 
+ * determine how to read data. The <code>LSParser</code> will look at the 
+ * different inputs specified in the <code>LSInput</code> in the following 
+ * order to know which one to read from, the first one that is not null and 
+ * not an empty string will be used: 
+ * <ol>
+ * <li> <code>LSInput.characterStream</code> 
+ * </li>
+ * <li> 
+ * <code>LSInput.byteStream</code> 
+ * </li>
+ * <li> <code>LSInput.stringData</code> 
+ * </li>
+ * <li> 
+ * <code>LSInput.systemId</code> 
+ * </li>
+ * <li> <code>LSInput.publicId</code> 
+ * </li>
+ * </ol> 
+ * <p> If all inputs are null, the <code>LSParser</code> will report a 
+ * <code>DOMError</code> with its <code>DOMError.type</code> set to 
+ * <code>"no-input-specified"</code> and its <code>DOMError.severity</code> 
+ * set to <code>DOMError.SEVERITY_FATAL_ERROR</code>. 
+ * <p> <code>LSInput</code> objects belong to the application. The DOM 
+ * implementation will never modify them (though it may make copies and 
+ * modify the copies, if necessary). 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSInput {
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a stream of 16-bit units. The application must encode the stream 
+     * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when 
+     * using character streams. If an XML declaration is present, the value 
+     * of the encoding attribute will be ignored. 
+     */
+    public java.io.Reader getCharacterStream();
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a stream of 16-bit units. The application must encode the stream 
+     * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when 
+     * using character streams. If an XML declaration is present, the value 
+     * of the encoding attribute will be ignored. 
+     */
+    public void setCharacterStream(java.io.Reader characterStream);
+
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a stream of bytes. 
+     * <br> If the application knows the character encoding of the byte 
+     * stream, it should set the encoding attribute. Setting the encoding in 
+     * this way will override any encoding specified in an XML declaration 
+     * in the data. 
+     */
+    public java.io.InputStream getByteStream();
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a stream of bytes. 
+     * <br> If the application knows the character encoding of the byte 
+     * stream, it should set the encoding attribute. Setting the encoding in 
+     * this way will override any encoding specified in an XML declaration 
+     * in the data. 
+     */
+    public void setByteStream(java.io.InputStream byteStream);
+
+    /**
+     *  String data to parse. If provided, this will always be treated as a 
+     * sequence of 16-bit units (UTF-16 encoded characters). It is not a 
+     * requirement to have an XML declaration when using 
+     * <code>stringData</code>. If an XML declaration is present, the value 
+     * of the encoding attribute will be ignored. 
+     */
+    public String getStringData();
+    /**
+     *  String data to parse. If provided, this will always be treated as a 
+     * sequence of 16-bit units (UTF-16 encoded characters). It is not a 
+     * requirement to have an XML declaration when using 
+     * <code>stringData</code>. If an XML declaration is present, the value 
+     * of the encoding attribute will be ignored. 
+     */
+    public void setStringData(String stringData);
+
+    /**
+     *  The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this 
+     * input source. The system identifier is optional if there is a byte 
+     * stream, a character stream, or string data. It is still useful to 
+     * provide one, since the application will use it to resolve any 
+     * relative URIs and can include it in error messages and warnings. (The 
+     * LSParser will only attempt to fetch the resource identified by the 
+     * URI reference if there is no other input available in the input 
+     * source.) 
+     * <br> If the application knows the character encoding of the object 
+     * pointed to by the system identifier, it can set the encoding using 
+     * the <code>encoding</code> attribute. 
+     * <br> If the specified system ID is a relative URI reference (see 
+     * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM 
+     * implementation will attempt to resolve the relative URI with the 
+     * <code>baseURI</code> as the base, if that fails, the behavior is 
+     * implementation dependent. 
+     */
+    public String getSystemId();
+    /**
+     *  The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this 
+     * input source. The system identifier is optional if there is a byte 
+     * stream, a character stream, or string data. It is still useful to 
+     * provide one, since the application will use it to resolve any 
+     * relative URIs and can include it in error messages and warnings. (The 
+     * LSParser will only attempt to fetch the resource identified by the 
+     * URI reference if there is no other input available in the input 
+     * source.) 
+     * <br> If the application knows the character encoding of the object 
+     * pointed to by the system identifier, it can set the encoding using 
+     * the <code>encoding</code> attribute. 
+     * <br> If the specified system ID is a relative URI reference (see 
+     * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM 
+     * implementation will attempt to resolve the relative URI with the 
+     * <code>baseURI</code> as the base, if that fails, the behavior is 
+     * implementation dependent. 
+     */
+    public void setSystemId(String systemId);
+
+    /**
+     *  The public identifier for this input source. This may be mapped to an 
+     * input source using an implementation dependent mechanism (such as 
+     * catalogues or other mappings). The public identifier, if specified, 
+     * may also be reported as part of the location information when errors 
+     * are reported. 
+     */
+    public String getPublicId();
+    /**
+     *  The public identifier for this input source. This may be mapped to an 
+     * input source using an implementation dependent mechanism (such as 
+     * catalogues or other mappings). The public identifier, if specified, 
+     * may also be reported as part of the location information when errors 
+     * are reported. 
+     */
+    public void setPublicId(String publicId);
+
+    /**
+     *  The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for 
+     * resolving a relative <code>systemId</code> to an absolute URI. 
+     * <br> If, when used, the base URI is itself a relative URI, an empty 
+     * string, or null, the behavior is implementation dependent. 
+     */
+    public String getBaseURI();
+    /**
+     *  The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for 
+     * resolving a relative <code>systemId</code> to an absolute URI. 
+     * <br> If, when used, the base URI is itself a relative URI, an empty 
+     * string, or null, the behavior is implementation dependent. 
+     */
+    public void setBaseURI(String baseURI);
+
+    /**
+     *  The character encoding, if known. The encoding must be a string 
+     * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section 
+     * 4.3.3 "Character Encoding in Entities"). 
+     * <br> This attribute has no effect when the application provides a 
+     * character stream or string data. For other sources of input, an 
+     * encoding specified by means of this attribute will override any 
+     * encoding specified in the XML declaration or the Text declaration, or 
+     * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>]. 
+     */
+    public String getEncoding();
+    /**
+     *  The character encoding, if known. The encoding must be a string 
+     * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section 
+     * 4.3.3 "Character Encoding in Entities"). 
+     * <br> This attribute has no effect when the application provides a 
+     * character stream or string data. For other sources of input, an 
+     * encoding specified by means of this attribute will override any 
+     * encoding specified in the XML declaration or the Text declaration, or 
+     * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>]. 
+     */
+    public void setEncoding(String encoding);
+
+    /**
+     *  If set to true, assume that the input is certified (see section 2.13 
+     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when 
+     * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. 
+     */
+    public boolean getCertifiedText();
+    /**
+     *  If set to true, assume that the input is certified (see section 2.13 
+     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when 
+     * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. 
+     */
+    public void setCertifiedText(boolean certifiedText);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.events.Event;
+
+/**
+ *  This interface represents a load event object that signals the completion 
+ * of a document load. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSLoadEvent extends Event {
+    /**
+     * The document that finished loading.
+     */
+    public Document getNewDocument();
+
+    /**
+     * The input source that was parsed.
+     */
+    public LSInput getInput();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+/**
+ *  This interface represents an output destination for data. 
+ * <p> This interface allows an application to encapsulate information about 
+ * an output destination in a single object, which may include a URI, a byte 
+ * stream (possibly with a specified encoding), a base URI, and/or a 
+ * character stream. 
+ * <p> The exact definitions of a byte stream and a character stream are 
+ * binding dependent. 
+ * <p> The application is expected to provide objects that implement this 
+ * interface whenever such objects are needed. The application can either 
+ * provide its own objects that implement this interface, or it can use the 
+ * generic factory method <code>DOMImplementationLS.createLSOutput()</code> 
+ * to create objects that implement this interface. 
+ * <p> The <code>LSSerializer</code> will use the <code>LSOutput</code> object 
+ * to determine where to serialize the output to. The 
+ * <code>LSSerializer</code> will look at the different outputs specified in 
+ * the <code>LSOutput</code> in the following order to know which one to 
+ * output to, the first one that is not null and not an empty string will be 
+ * used: 
+ * <ol>
+ * <li> <code>LSOutput.characterStream</code> 
+ * </li>
+ * <li> 
+ * <code>LSOutput.byteStream</code> 
+ * </li>
+ * <li> <code>LSOutput.systemId</code> 
+ * </li>
+ * </ol> 
+ * <p> <code>LSOutput</code> objects belong to the application. The DOM 
+ * implementation will never modify them (though it may make copies and 
+ * modify the copies, if necessary). 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSOutput {
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a writable stream to which 16-bit units can be output. 
+     */
+    public java.io.Writer getCharacterStream();
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a writable stream to which 16-bit units can be output. 
+     */
+    public void setCharacterStream(java.io.Writer characterStream);
+
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a writable stream of bytes. 
+     */
+    public java.io.OutputStream getByteStream();
+    /**
+     *  An attribute of a language and binding dependent type that represents 
+     * a writable stream of bytes. 
+     */
+    public void setByteStream(java.io.OutputStream byteStream);
+
+    /**
+     *  The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this 
+     * output destination. 
+     * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the 
+     * behavior is implementation dependent. 
+     */
+    public String getSystemId();
+    /**
+     *  The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this 
+     * output destination. 
+     * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the 
+     * behavior is implementation dependent. 
+     */
+    public void setSystemId(String systemId);
+
+    /**
+     *  The character encoding to use for the output. The encoding must be a 
+     * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section 
+     * 4.3.3 "Character Encoding in Entities"), it is recommended that 
+     * character encodings registered (as charsets) with the Internet 
+     * Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
+     *  should be referred to using their registered names. 
+     */
+    public String getEncoding();
+    /**
+     *  The character encoding to use for the output. The encoding must be a 
+     * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section 
+     * 4.3.3 "Character Encoding in Entities"), it is recommended that 
+     * character encodings registered (as charsets) with the Internet 
+     * Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
+     *  should be referred to using their registered names. 
+     */
+    public void setEncoding(String encoding);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,466 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ *  An interface to an object that is able to build, or augment, a DOM tree 
+ * from various input sources. 
+ * <p> <code>LSParser</code> provides an API for parsing XML and building the 
+ * corresponding DOM document structure. A <code>LSParser</code> instance 
+ * can be obtained by invoking the 
+ * <code>DOMImplementationLS.createLSParser()</code> method. 
+ * <p> As specified in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , when a document is first made available via the LSParser: 
+ * <ul>
+ * <li> there will 
+ * never be two adjacent nodes of type NODE_TEXT, and there will never be 
+ * empty text nodes. 
+ * </li>
+ * <li> it is expected that the <code>value</code> and 
+ * <code>nodeValue</code> attributes of an <code>Attr</code> node initially 
+ * return the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#AVNormalize'>XML 1.0 
+ * normalized value</a>. However, if the parameters "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate-if-schema'>
+ * validate-if-schema</a>" and "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
+ * datatype-normalization</a>" are set to <code>true</code>, depending on the attribute normalization 
+ * used, the attribute values may differ from the ones obtained by the XML 
+ * 1.0 attribute normalization. If the parameters "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
+ * datatype-normalization</a>" is set to <code>false</code>, the XML 1.0 attribute normalization is 
+ * guaranteed to occur, and if the attributes list does not contain 
+ * namespace declarations, the <code>attributes</code> attribute on 
+ * <code>Element</code> node represents the property <b>[attributes]</b> defined in [<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
+ * . 
+ * </li>
+ * </ul>
+ * <p> Asynchronous <code>LSParser</code> objects are expected to also 
+ * implement the <code>events::EventTarget</code> interface so that event 
+ * listeners can be registered on asynchronous <code>LSParser</code> 
+ * objects. 
+ * <p> Events supported by asynchronous <code>LSParser</code> objects are: 
+ * <dl>
+ * <dt>load</dt>
+ * <dd>
+ *  The <code>LSParser</code> finishes to load the document. See also the 
+ * definition of the <code>LSLoadEvent</code> interface. </dd>
+ * <dt>progress</dt>
+ * <dd> The 
+ * <code>LSParser</code> signals progress as data is parsed.  This 
+ * specification does not attempt to define exactly when progress events 
+ * should be dispatched. That is intentionally left as 
+ * implementation-dependent. Here is one example of how an application might 
+ * dispatch progress events: Once the parser starts receiving data, a 
+ * progress event is dispatched to indicate that the parsing starts. From 
+ * there on, a progress event is dispatched for every 4096 bytes of data 
+ * that is received and processed. This is only one example, though, and 
+ * implementations can choose to dispatch progress events at any time while 
+ * parsing, or not dispatch them at all.  See also the definition of the 
+ * <code>LSProgressEvent</code> interface. </dd>
+ * </dl>
+ * <p ><b>Note:</b>  All events defined in this specification use the 
+ * namespace URI <code>"http://www.w3.org/2002/DOMLS"</code>. 
+ * <p> While parsing an input source, errors are reported to the application 
+ * through the error handler (<code>LSParser.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+ * error-handler</a>" parameter). This specification does in no way try to define all possible 
+ * errors that can occur while parsing XML, or any other markup, but some 
+ * common error cases are defined. The types (<code>DOMError.type</code>) of 
+ * errors and warnings defined by this specification are: 
+ * <dl>
+ * <dt> 
+ * <code>"check-character-normalization-failure" [error]</code> </dt>
+ * <dd> Raised if 
+ * the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-check-character-normalization'>
+ * check-character-normalization</a>" is set to true and a string is encountered that fails normalization 
+ * checking. </dd>
+ * <dt><code>"doctype-not-allowed" [fatal]</code></dt>
+ * <dd> Raised if the 
+ * configuration parameter "disallow-doctype" is set to <code>true</code> 
+ * and a doctype is encountered. </dd>
+ * <dt><code>"no-input-specified" [fatal]</code></dt>
+ * <dd> 
+ * Raised when loading a document and no input is specified in the 
+ * <code>LSInput</code> object. </dd>
+ * <dt>
+ * <code>"pi-base-uri-not-preserved" [warning]</code></dt>
+ * <dd> Raised if a processing 
+ * instruction is encountered in a location where the base URI of the 
+ * processing instruction can not be preserved.  One example of a case where 
+ * this warning will be raised is if the configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>" is set to <code>false</code> and the following XML file is parsed: 
+ * <pre>
+ * <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]> 
+ * <root> &e; </root></pre>
+ *  And <code>subdir/myentity.ent</code> 
+ * contains: 
+ * <pre><one> <two/> </one> <?pi 3.14159?> 
+ * <more/></pre>
+ * </dd>
+ * <dt><code>"unbound-prefix-in-entity" [warning]</code></dt>
+ * <dd> An 
+ * implementation dependent warning that may be raised if the configuration 
+ * parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
+ * namespaces</a>" is set to <code>true</code> and an unbound namespace prefix is 
+ * encountered in an entity's replacement text. Raising this warning is not 
+ * enforced since some existing parsers may not recognize unbound namespace 
+ * prefixes in the replacement text of entities. </dd>
+ * <dt>
+ * <code>"unknown-character-denormalization" [fatal]</code></dt>
+ * <dd> Raised if the 
+ * configuration parameter "ignore-unknown-character-denormalizations" is 
+ * set to <code>false</code> and a character is encountered for which the 
+ * processor cannot determine the normalization properties. </dd>
+ * <dt>
+ * <code>"unsupported-encoding" [fatal]</code></dt>
+ * <dd> Raised if an unsupported 
+ * encoding is encountered. </dd>
+ * <dt><code>"unsupported-media-type" [fatal]</code></dt>
+ * <dd> 
+ * Raised if the configuration parameter "supported-media-types-only" is set 
+ * to <code>true</code> and an unsupported media type is encountered. </dd>
+ * </dl> 
+ * <p> In addition to raising the defined errors and warnings, implementations 
+ * are expected to raise implementation specific errors and warnings for any 
+ * other error and warning cases such as IO errors (file not found, 
+ * permission denied,...), XML well-formedness errors, and so on. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSParser {
+    /**
+     *  The <code>DOMConfiguration</code> object used when parsing an input 
+     * source. This <code>DOMConfiguration</code> is specific to the parse 
+     * operation. No parameter values from this <code>DOMConfiguration</code>
+     *  object are passed automatically to the <code>DOMConfiguration</code> 
+     * object on the <code>Document</code> that is created, or used, by the 
+     * parse operation. The DOM application is responsible for passing any 
+     * needed parameter values from this <code>DOMConfiguration</code> 
+     * object to the <code>DOMConfiguration</code> object referenced by the 
+     * <code>Document</code> object. 
+     * <br> In addition to the parameters recognized in on the <a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
+     * DOMConfiguration</a> interface defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , the <code>DOMConfiguration</code> objects for <code>LSParser</code> 
+     * add or modify the following parameters: 
+     * <dl>
+     * <dt>
+     * <code>"charset-overrides-xml-encoding"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt><code>true</code></dt>
+     * <dd>[<em>optional</em>] (<em>default</em>) If a higher level protocol such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] provides an 
+     * indication of the character encoding of the input stream being 
+     * processed, that will override any encoding specified in the XML 
+     * declaration or the Text declaration (see also section 4.3.3, 
+     * "Character Encoding in Entities", in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]). 
+     * Explicitly setting an encoding in the <code>LSInput</code> overrides 
+     * any encoding from the protocol. </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>required</em>] The parser ignores any character set encoding information from 
+     * higher-level protocols. </dd>
+     * </dl></dd>
+     * <dt><code>"disallow-doctype"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>optional</em>] Throw a fatal <b>"doctype-not-allowed"</b> error if a doctype node is found while parsing the document. This is 
+     * useful when dealing with things like SOAP envelopes where doctype 
+     * nodes are not allowed. </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Allow doctype nodes in the document. </dd>
+     * </dl></dd>
+     * <dt>
+     * <code>"ignore-unknown-character-denormalizations"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is 
+     * supported, a processor encounters characters for which it cannot 
+     * determine the normalization properties, then the processor will 
+     * ignore any possible denormalizations caused by these characters.  
+     * This parameter is ignored for [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. </dd>
+     * <dt>
+     * <code>false</code></dt>
+     * <dd>[<em>optional</em>] Report an fatal <b>"unknown-character-denormalization"</b> error if a character is encountered for which the processor cannot 
+     * determine the normalization properties. </dd>
+     * </dl></dd>
+     * <dt><code>"infoset"</code></dt>
+     * <dd> See 
+     * the definition of <code>DOMConfiguration</code> for a description of 
+     * this parameter. Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , this parameter will default to <code>true</code> for 
+     * <code>LSParser</code>. </dd>
+     * <dt><code>"namespaces"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt><code>true</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Perform the namespace processing as defined in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+     *  and [<a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/'>XML Namespaces 1.1</a>]
+     * . </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>optional</em>] Do not perform the namespace processing. </dd>
+     * </dl></dd>
+     * <dt>
+     * <code>"resource-resolver"</code></dt>
+     * <dd>[<em>required</em>] A reference to a <code>LSResourceResolver</code> object, or null. If 
+     * the value of this parameter is not null when an external resource 
+     * (such as an external XML entity or an XML schema location) is 
+     * encountered, the implementation will request that the 
+     * <code>LSResourceResolver</code> referenced in this parameter resolves 
+     * the resource. </dd>
+     * <dt><code>"supported-media-types-only"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>optional</em>] Check that the media type of the parsed resource is a supported media 
+     * type. If an unsupported media type is encountered, a fatal error of 
+     * type <b>"unsupported-media-type"</b> will be raised. The media types defined in [<a href='http://www.ietf.org/rfc/rfc3023.txt'>IETF RFC 3023</a>] must always 
+     * be accepted. </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Accept any media type. </dd>
+     * </dl></dd>
+     * <dt><code>"validate"</code></dt>
+     * <dd> See the definition of 
+     * <code>DOMConfiguration</code> for a description of this parameter. 
+     * Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , the processing of the internal subset is always accomplished, even 
+     * if this parameter is set to <code>false</code>. </dd>
+     * <dt>
+     * <code>"validate-if-schema"</code></dt>
+     * <dd> See the definition of 
+     * <code>DOMConfiguration</code> for a description of this parameter. 
+     * Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , the processing of the internal subset is always accomplished, even 
+     * if this parameter is set to <code>false</code>. </dd>
+     * <dt>
+     * <code>"well-formed"</code></dt>
+     * <dd> See the definition of 
+     * <code>DOMConfiguration</code> for a description of this parameter. 
+     * Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , this parameter cannot be set to <code>false</code>. </dd>
+     * </dl>
+     */
+    public DOMConfiguration getDomConfig();
+
+    /**
+     *  When a filter is provided, the implementation will call out to the 
+     * filter as it is constructing the DOM tree structure. The filter can 
+     * choose to remove elements from the document being constructed, or to 
+     * terminate the parsing early. 
+     * <br> The filter is invoked after the operations requested by the 
+     * <code>DOMConfiguration</code> parameters have been applied. For 
+     * example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
+     * validate</a>" is set to <code>true</code>, the validation is done before invoking the 
+     * filter. 
+     */
+    public LSParserFilter getFilter();
+    /**
+     *  When a filter is provided, the implementation will call out to the 
+     * filter as it is constructing the DOM tree structure. The filter can 
+     * choose to remove elements from the document being constructed, or to 
+     * terminate the parsing early. 
+     * <br> The filter is invoked after the operations requested by the 
+     * <code>DOMConfiguration</code> parameters have been applied. For 
+     * example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
+     * validate</a>" is set to <code>true</code>, the validation is done before invoking the 
+     * filter. 
+     */
+    public void setFilter(LSParserFilter filter);
+
+    /**
+     *  <code>true</code> if the <code>LSParser</code> is asynchronous, 
+     * <code>false</code> if it is synchronous. 
+     */
+    public boolean getAsync();
+
+    /**
+     *  <code>true</code> if the <code>LSParser</code> is currently busy 
+     * loading a document, otherwise <code>false</code>. 
+     */
+    public boolean getBusy();
+
+    /**
+     * Parse an XML document from a resource identified by a 
+     * <code>LSInput</code>.
+     * @param input  The <code>LSInput</code> from which the source of the 
+     *   document is to be read. 
+     * @return  If the <code>LSParser</code> is a synchronous 
+     *   <code>LSParser</code>, the newly created and populated 
+     *   <code>Document</code> is returned. If the <code>LSParser</code> is 
+     *   asynchronous, <code>null</code> is returned since the document 
+     *   object may not yet be constructed when this method returns. 
+     * @exception DOMException
+     *    INVALID_STATE_ERR: Raised if the <code>LSParser</code>'s 
+     *   <code>LSParser.busy</code> attribute is <code>true</code>. 
+     * @exception LSException
+     *    PARSE_ERR: Raised if the <code>LSParser</code> was unable to load 
+     *   the XML document. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public Document parse(LSInput input)
+                          throws DOMException, LSException;
+
+    /**
+     *  Parse an XML document from a location identified by a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. If the URI 
+     * contains a fragment identifier (see section 4.1 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the 
+     * behavior is not defined by this specification, future versions of 
+     * this specification may define the behavior. 
+     * @param uri The location of the XML document to be read.
+     * @return  If the <code>LSParser</code> is a synchronous 
+     *   <code>LSParser</code>, the newly created and populated 
+     *   <code>Document</code> is returned, or <code>null</code> if an error 
+     *   occured. If the <code>LSParser</code> is asynchronous, 
+     *   <code>null</code> is returned since the document object may not yet 
+     *   be constructed when this method returns. 
+     * @exception DOMException
+     *    INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code> 
+     *   attribute is <code>true</code>. 
+     * @exception LSException
+     *    PARSE_ERR: Raised if the <code>LSParser</code> was unable to load 
+     *   the XML document. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public Document parseURI(String uri)
+                             throws DOMException, LSException;
+
+    // ACTION_TYPES
+    /**
+     *  Append the result of the parse operation as children of the context 
+     * node. For this action to work, the context node must be an 
+     * <code>Element</code> or a <code>DocumentFragment</code>. 
+     */
+    public static final short ACTION_APPEND_AS_CHILDREN = 1;
+    /**
+     *  Replace all the children of the context node with the result of the 
+     * parse operation. For this action to work, the context node must be an 
+     * <code>Element</code>, a <code>Document</code>, or a 
+     * <code>DocumentFragment</code>. 
+     */
+    public static final short ACTION_REPLACE_CHILDREN   = 2;
+    /**
+     *  Insert the result of the parse operation as the immediately preceding 
+     * sibling of the context node. For this action to work the context 
+     * node's parent must be an <code>Element</code> or a 
+     * <code>DocumentFragment</code>. 
+     */
+    public static final short ACTION_INSERT_BEFORE      = 3;
+    /**
+     *  Insert the result of the parse operation as the immediately following 
+     * sibling of the context node. For this action to work the context 
+     * node's parent must be an <code>Element</code> or a 
+     * <code>DocumentFragment</code>. 
+     */
+    public static final short ACTION_INSERT_AFTER       = 4;
+    /**
+     *  Replace the context node with the result of the parse operation. For 
+     * this action to work, the context node must have a parent, and the 
+     * parent must be an <code>Element</code> or a 
+     * <code>DocumentFragment</code>. 
+     */
+    public static final short ACTION_REPLACE            = 5;
+
+    /**
+     *  Parse an XML fragment from a resource identified by a 
+     * <code>LSInput</code> and insert the content into an existing document 
+     * at the position specified with the <code>context</code> and 
+     * <code>action</code> arguments. When parsing the input stream, the 
+     * context node (or its parent, depending on where the result will be 
+     * inserted) is used for resolving unbound namespace prefixes. The 
+     * context node's <code>ownerDocument</code> node (or the node itself if 
+     * the node of type <code>DOCUMENT_NODE</code>) is used to resolve 
+     * default attributes and entity references. 
+     * <br> As the new data is inserted into the document, at least one 
+     * mutation event is fired per new immediate child or sibling of the 
+     * context node. 
+     * <br> If the context node is a <code>Document</code> node and the action 
+     * is <code>ACTION_REPLACE_CHILDREN</code>, then the document that is 
+     * passed as the context node will be changed such that its 
+     * <code>xmlEncoding</code>, <code>documentURI</code>, 
+     * <code>xmlVersion</code>, <code>inputEncoding</code>, 
+     * <code>xmlStandalone</code>, and all other such attributes are set to 
+     * what they would be set to if the input source was parsed using 
+     * <code>LSParser.parse()</code>. 
+     * <br> This method is always synchronous, even if the 
+     * <code>LSParser</code> is asynchronous (<code>LSParser.async</code> is 
+     * <code>true</code>). 
+     * <br> If an error occurs while parsing, the caller is notified through 
+     * the <code>ErrorHandler</code> instance associated with the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     * error-handler</a>" parameter of the <code>DOMConfiguration</code>. 
+     * <br> When calling <code>parseWithContext</code>, the values of the 
+     * following configuration parameters will be ignored and their default 
+     * values will always be used instead: "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
+     * validate</a>", "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate-if-schema'>
+     * validate-if-schema</a>", and "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-element-content-whitespace'>
+     * element-content-whitespace</a>". Other parameters will be treated normally, and the parser is expected 
+     * to call the <code>LSParserFilter</code> just as if a whole document 
+     * was parsed. 
+     * @param input  The <code>LSInput</code> from which the source document 
+     *   is to be read. The source document must be an XML fragment, i.e. 
+     *   anything except a complete XML document (except in the case where 
+     *   the context node of type <code>DOCUMENT_NODE</code>, and the action 
+     *   is <code>ACTION_REPLACE_CHILDREN</code>), a DOCTYPE (internal 
+     *   subset), entity declaration(s), notation declaration(s), or XML or 
+     *   text declaration(s). 
+     * @param contextArg  The node that is used as the context for the data 
+     *   that is being parsed. This node must be a <code>Document</code> 
+     *   node, a <code>DocumentFragment</code> node, or a node of a type 
+     *   that is allowed as a child of an <code>Element</code> node, e.g. it 
+     *   cannot be an <code>Attribute</code> node. 
+     * @param action  This parameter describes which action should be taken 
+     *   between the new set of nodes being inserted and the existing 
+     *   children of the context node. The set of possible actions is 
+     *   defined in <code>ACTION_TYPES</code> above. 
+     * @return  Return the node that is the result of the parse operation. If 
+     *   the result is more than one top-level node, the first one is 
+     *   returned. 
+     * @exception DOMException
+     *   HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be 
+     *   inserted before, after, or as a child of the context node (see also 
+     *   <code>Node.insertBefore</code> or <code>Node.replaceChild</code> in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     *   ).
+     *   <br> NOT_SUPPORTED_ERR: Raised if the <code>LSParser</code> doesn't 
+     *   support this method, or if the context node is of type 
+     *   <code>Document</code> and the DOM implementation doesn't support 
+     *   the replacement of the <code>DocumentType</code> child or 
+     *   <code>Element</code> child. 
+     *   <br> NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a 
+     *   read only node and the content is being appended to its child list, 
+     *   or if the parent node of the context node is read only node and the 
+     *   content is being inserted in its child list.
+     *   <br> INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code> 
+     *   attribute is <code>true</code>. 
+     * @exception LSException
+     *    PARSE_ERR: Raised if the <code>LSParser</code> was unable to load 
+     *   the XML fragment. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public Node parseWithContext(LSInput input, 
+                                 Node contextArg, 
+                                 short action)
+                                 throws DOMException, LSException;
+
+    /**
+     *  Abort the loading of the document that is currently being loaded by 
+     * the <code>LSParser</code>. If the <code>LSParser</code> is currently 
+     * not busy, a call to this method does nothing. 
+     */
+    public void abort();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.Element;
+
+/**
+ *  <code>LSParserFilter</code>s provide applications the ability to examine 
+ * nodes as they are being constructed while parsing. As each node is 
+ * examined, it may be modified or removed, or the entire parse may be 
+ * terminated early. 
+ * <p> At the time any of the filter methods are called by the parser, the 
+ * owner Document and DOMImplementation objects exist and are accessible. 
+ * The document element is never passed to the <code>LSParserFilter</code> 
+ * methods, i.e. it is not possible to filter out the document element. 
+ * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>, 
+ * <code>Entity</code>, and <code>Attr</code> nodes are never passed to the 
+ * <code>acceptNode</code> method on the filter. The child nodes of an 
+ * <code>EntityReference</code> node are passed to the filter if the 
+ * parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>" is set to <code>false</code>. Note that, as described by the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>", unexpanded entity reference nodes are never discarded and are always 
+ * passed to the filter. 
+ * <p> All validity checking while parsing a document occurs on the source 
+ * document as it appears on the input stream, not on the DOM document as it 
+ * is built in memory. With filters, the document in memory may be a subset 
+ * of the document on the stream, and its validity may have been affected by 
+ * the filtering. 
+ * <p> All default attributes must be present on elements when the elements 
+ * are passed to the filter methods. All other default content must be 
+ * passed to the filter methods. 
+ * <p> DOM applications must not raise exceptions in a filter. The effect of 
+ * throwing exceptions from a filter is DOM implementation dependent. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSParserFilter {
+    // Constants returned by startElement and acceptNode
+    /**
+     * Accept the node.
+     */
+    public static final short FILTER_ACCEPT             = 1;
+    /**
+     * Reject the node and its children.
+     */
+    public static final short FILTER_REJECT             = 2;
+    /**
+     * Skip this single node. The children of this node will still be 
+     * considered. 
+     */
+    public static final short FILTER_SKIP               = 3;
+    /**
+     *  Interrupt the normal processing of the document. 
+     */
+    public static final short FILTER_INTERRUPT          = 4;
+
+    /**
+     *  The parser will call this method after each <code>Element</code> start 
+     * tag has been scanned, but before the remainder of the 
+     * <code>Element</code> is processed. The intent is to allow the 
+     * element, including any children, to be efficiently skipped. Note that 
+     * only element nodes are passed to the <code>startElement</code> 
+     * function. 
+     * <br>The element node passed to <code>startElement</code> for filtering 
+     * will include all of the Element's attributes, but none of the 
+     * children nodes. The Element may not yet be in place in the document 
+     * being constructed (it may not have a parent node.) 
+     * <br>A <code>startElement</code> filter function may access or change 
+     * the attributes for the Element. Changing Namespace declarations will 
+     * have no effect on namespace resolution by the parser.
+     * <br>For efficiency, the Element node passed to the filter may not be 
+     * the same one as is actually placed in the tree if the node is 
+     * accepted. And the actual node (node object identity) may be reused 
+     * during the process of reading in and filtering a document.
+     * @param elementArg The newly encountered element. At the time this 
+     *   method is called, the element is incomplete - it will have its 
+     *   attributes, but no children. 
+     * @return 
+     * <ul>
+     * <li> <code>FILTER_ACCEPT</code> if the <code>Element</code> should 
+     *   be included in the DOM document being built. 
+     * </li>
+     * <li> 
+     *   <code>FILTER_REJECT</code> if the <code>Element</code> and all of 
+     *   its children should be rejected. 
+     * </li>
+     * <li> <code>FILTER_SKIP</code> if the 
+     *   <code>Element</code> should be skipped. All of its children are 
+     *   inserted in place of the skipped <code>Element</code> node. 
+     * </li>
+     * <li> 
+     *   <code>FILTER_INTERRUPT</code> if the filter wants to stop the 
+     *   processing of the document. Interrupting the processing of the 
+     *   document does no longer guarantee that the resulting DOM tree is 
+     *   XML well-formed. The <code>Element</code> is rejected. 
+     * </li>
+     * </ul> Returning 
+     *   any other values will result in unspecified behavior. 
+     */
+    public short startElement(Element elementArg);
+
+    /**
+     * This method will be called by the parser at the completion of the 
+     * parsing of each node. The node and all of its descendants will exist 
+     * and be complete. The parent node will also exist, although it may be 
+     * incomplete, i.e. it may have additional children that have not yet 
+     * been parsed. Attribute nodes are never passed to this function.
+     * <br>From within this method, the new node may be freely modified - 
+     * children may be added or removed, text nodes modified, etc. The state 
+     * of the rest of the document outside this node is not defined, and the 
+     * affect of any attempt to navigate to, or to modify any other part of 
+     * the document is undefined. 
+     * <br>For validating parsers, the checks are made on the original 
+     * document, before any modification by the filter. No validity checks 
+     * are made on any document modifications made by the filter.
+     * <br>If this new node is rejected, the parser might reuse the new node 
+     * and any of its descendants.
+     * @param nodeArg The newly constructed element. At the time this method 
+     *   is called, the element is complete - it has all of its children 
+     *   (and their children, recursively) and attributes, and is attached 
+     *   as a child to its parent. 
+     * @return 
+     * <ul>
+     * <li> <code>FILTER_ACCEPT</code> if this <code>Node</code> should 
+     *   be included in the DOM document being built. 
+     * </li>
+     * <li> 
+     *   <code>FILTER_REJECT</code> if the <code>Node</code> and all of its 
+     *   children should be rejected. 
+     * </li>
+     * <li> <code>FILTER_SKIP</code> if the 
+     *   <code>Node</code> should be skipped and the <code>Node</code> 
+     *   should be replaced by all the children of the <code>Node</code>. 
+     * </li>
+     * <li> 
+     *   <code>FILTER_INTERRUPT</code> if the filter wants to stop the 
+     *   processing of the document. Interrupting the processing of the 
+     *   document does no longer guarantee that the resulting DOM tree is 
+     *   XML well-formed. The <code>Node</code> is accepted and will be the 
+     *   last completely parsed node. 
+     * </li>
+     * </ul>
+     */
+    public short acceptNode(Node nodeArg);
+
+    /**
+     *  Tells the <code>LSParser</code> what types of nodes to show to the 
+     * method <code>LSParserFilter.acceptNode</code>. If a node is not shown 
+     * to the filter using this attribute, it is automatically included in 
+     * the DOM document being built. See <code>NodeFilter</code> for 
+     * definition of the constants. The constants <code>SHOW_ATTRIBUTE</code>
+     * , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>, 
+     * <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and 
+     * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes 
+     * will never be passed to <code>LSParserFilter.acceptNode</code>. 
+     * <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
+     * . 
+     */
+    public int getWhatToShow();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.events.Event;
+
+/**
+ *  This interface represents a progress event object that notifies the 
+ * application about progress as a document is parsed. It extends the 
+ * <code>Event</code> interface defined in [<a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>DOM Level 3 Events</a>]
+ * . 
+ * <p> The units used for the attributes <code>position</code> and 
+ * <code>totalSize</code> are not specified and can be implementation and 
+ * input dependent. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSProgressEvent extends Event {
+    /**
+     * The input source that is being parsed.
+     */
+    public LSInput getInput();
+
+    /**
+     * The current position in the input source, including all external 
+     * entities and other resources that have been read.
+     */
+    public int getPosition();
+
+    /**
+     * The total size of the document including all external resources, this 
+     * number might change as a document is being parsed if references to 
+     * more external resources are seen. A value of <code>0</code> is 
+     * returned if the total size cannot be determined or estimated.
+     */
+    public int getTotalSize();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+/**
+ *  <code>LSResourceResolver</code> provides a way for applications to 
+ * redirect references to external resources. 
+ * <p> Applications needing to implement custom handling for external 
+ * resources can implement this interface and register their implementation 
+ * by setting the "resource-resolver" parameter of 
+ * <code>DOMConfiguration</code> objects attached to <code>LSParser</code> 
+ * and <code>LSSerializer</code>. It can also be register on 
+ * <code>DOMConfiguration</code> objects attached to <code>Document</code> 
+ * if the "LS" feature is supported. 
+ * <p> The <code>LSParser</code> will then allow the application to intercept 
+ * any external entities, including the external DTD subset and external 
+ * parameter entities, before including them. The top-level document entity 
+ * is never passed to the <code>resolveResource</code> method. 
+ * <p> Many DOM applications will not need to implement this interface, but it 
+ * will be especially useful for applications that build XML documents from 
+ * databases or other specialized input sources, or for applications that 
+ * use URNs. 
+ * <p ><b>Note:</b>  <code>LSResourceResolver</code> is based on the SAX2 [<a href='http://www.saxproject.org/'>SAX</a>] <code>EntityResolver</code> 
+ * interface. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSResourceResolver {
+    /**
+     *  Allow the application to resolve external resources. 
+     * <br> The <code>LSParser</code> will call this method before opening any 
+     * external resource, including the external DTD subset, external 
+     * entities referenced within the DTD, and external entities referenced 
+     * within the document element (however, the top-level document entity 
+     * is not passed to this method). The application may then request that 
+     * the <code>LSParser</code> resolve the external resource itself, that 
+     * it use an alternative URI, or that it use an entirely different input 
+     * source. 
+     * <br> Application writers can use this method to redirect external 
+     * system identifiers to secure and/or local URI, to look up public 
+     * identifiers in a catalogue, or to read an entity from a database or 
+     * other input source (including, for example, a dialog box). 
+     * @param type  The type of the resource being resolved. For XML [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] resources 
+     *   (i.e. entities), applications must use the value 
+     *   <code>"http://www.w3.org/TR/REC-xml"</code>. For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     *   , applications must use the value 
+     *   <code>"http://www.w3.org/2001/XMLSchema"</code>. Other types of 
+     *   resources are outside the scope of this specification and therefore 
+     *   should recommend an absolute URI in order to use this method. 
+     * @param namespaceURI  The namespace of the resource being resolved, 
+     *   e.g. the target namespace of the XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+     *    when resolving XML Schema resources. 
+     * @param publicId  The public identifier of the external entity being 
+     *   referenced, or <code>null</code> if no public identifier was 
+     *   supplied or if the resource is not an entity. 
+     * @param systemId  The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], of the 
+     *   external resource being referenced, or <code>null</code> if no 
+     *   system identifier was supplied. 
+     * @param baseURI  The absolute base URI of the resource being parsed, or 
+     *   <code>null</code> if there is no base URI. 
+     * @return  A <code>LSInput</code> object describing the new input 
+     *   source, or <code>null</code> to request that the parser open a 
+     *   regular URI connection to the resource. 
+     */
+    public LSInput resolveResource(String type, 
+                                   String namespaceURI, 
+                                   String publicId, 
+                                   String systemId, 
+                                   String baseURI);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,436 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ *  A <code>LSSerializer</code> provides an API for serializing (writing) a 
+ * DOM document out into XML. The XML data is written to a string or an 
+ * output stream. Any changes or fixups made during the serialization affect 
+ * only the serialized data. The <code>Document</code> object and its 
+ * children are never altered by the serialization operation. 
+ * <p> During serialization of XML data, namespace fixup is done as defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , Appendix B. [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>DOM Level 2 Core</a>]
+ *  allows empty strings as a real namespace URI. If the 
+ * <code>namespaceURI</code> of a <code>Node</code> is empty string, the 
+ * serialization will treat them as <code>null</code>, ignoring the prefix 
+ * if any. 
+ * <p> <code>LSSerializer</code> accepts any node type for serialization. For 
+ * nodes of type <code>Document</code> or <code>Entity</code>, well-formed 
+ * XML will be created when possible (well-formedness is guaranteed if the 
+ * document or entity comes from a parse operation and is unchanged since it 
+ * was created). The serialized output for these node types is either as a 
+ * XML document or an External XML Entity, respectively, and is acceptable 
+ * input for an XML parser. For all other types of nodes the serialized form 
+ * is implementation dependent. 
+ * <p>Within a <code>Document</code>, <code>DocumentFragment</code>, or 
+ * <code>Entity</code> being serialized, <code>Nodes</code> are processed as 
+ * follows
+ * <ul>
+ * <li> <code>Document</code> nodes are written, including the XML 
+ * declaration (unless the parameter "xml-declaration" is set to 
+ * <code>false</code>) and a DTD subset, if one exists in the DOM. Writing a 
+ * <code>Document</code> node serializes the entire document. 
+ * </li>
+ * <li> 
+ * <code>Entity</code> nodes, when written directly by 
+ * <code>LSSerializer.write</code>, outputs the entity expansion but no 
+ * namespace fixup is done. The resulting output will be valid as an 
+ * external entity. 
+ * </li>
+ * <li> If the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>" is set to <code>true</code>, <code>EntityReference</code> nodes are 
+ * serialized as an entity reference of the form "
+ * <code>&entityName;</code>" in the output. Child nodes (the expansion) 
+ * of the entity reference are ignored. If the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>" is set to <code>false</code>, only the children of the entity reference 
+ * are serialized. <code>EntityReference</code> nodes with no children (no 
+ * corresponding <code>Entity</code> node or the corresponding 
+ * <code>Entity</code> nodes have no children) are always serialized. 
+ * </li>
+ * <li> 
+ * <code>CDATAsections</code> containing content characters that cannot be 
+ * represented in the specified output encoding are handled according to the 
+ * "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-split-cdata-sections'>
+ * split-cdata-sections</a>" parameter.  If the parameter is set to <code>true</code>, 
+ * <code>CDATAsections</code> are split, and the unrepresentable characters 
+ * are serialized as numeric character references in ordinary content. The 
+ * exact position and number of splits is not specified.  If the parameter 
+ * is set to <code>false</code>, unrepresentable characters in a 
+ * <code>CDATAsection</code> are reported as 
+ * <code>"wf-invalid-character"</code> errors if the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
+ * well-formed</a>" is set to <code>true</code>. The error is not recoverable - there is no 
+ * mechanism for supplying alternative characters and continuing with the 
+ * serialization. 
+ * </li>
+ * <li> <code>DocumentFragment</code> nodes are serialized by 
+ * serializing the children of the document fragment in the order they 
+ * appear in the document fragment. 
+ * </li>
+ * <li> All other node types (Element, Text, 
+ * etc.) are serialized to their corresponding XML source form. 
+ * </li>
+ * </ul>
+ * <p ><b>Note:</b>  The serialization of a <code>Node</code> does not always 
+ * generate a well-formed XML document, i.e. a <code>LSParser</code> might 
+ * throw fatal errors when parsing the resulting serialization. 
+ * <p> Within the character data of a document (outside of markup), any 
+ * characters that cannot be represented directly are replaced with 
+ * character references. Occurrences of '<' and '&' are replaced by 
+ * the predefined entities &lt; and &amp;. The other predefined 
+ * entities (&gt;, &apos;, and &quot;) might not be used, except 
+ * where needed (e.g. using &gt; in cases such as ']]>'). Any 
+ * characters that cannot be represented directly in the output character 
+ * encoding are serialized as numeric character references (and since 
+ * character encoding standards commonly use hexadecimal representations of 
+ * characters, using the hexadecimal representation when serializing 
+ * character references is encouraged). 
+ * <p> To allow attribute values to contain both single and double quotes, the 
+ * apostrophe or single-quote character (') may be represented as 
+ * "&apos;", and the double-quote character (")  as "&quot;". New 
+ * line characters and other characters that cannot be represented directly 
+ * in attribute values in the output character encoding are serialized as a 
+ * numeric character reference. 
+ * <p> Within markup, but outside of attributes, any occurrence of a character 
+ * that cannot be represented in the output character encoding is reported 
+ * as a <code>DOMError</code> fatal error. An example would be serializing 
+ * the element <LaCa\u00f1ada/> with <code>encoding="us-ascii"</code>. 
+ * This will result with a generation of a <code>DOMError</code> 
+ * "wf-invalid-character-in-node-name" (as proposed in "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
+ * well-formed</a>"). 
+ * <p> When requested by setting the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-normalize-characters'>
+ * normalize-characters</a>" on <code>LSSerializer</code> to true, character normalization is 
+ * performed according to the definition of <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully 
+ * normalized</a> characters included in appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] on all 
+ * data to be serialized, both markup and character data. The character 
+ * normalization process affects only the data as it is being written; it 
+ * does not alter the DOM's view of the document after serialization has 
+ * completed. 
+ * <p> Implementations are required to support the encodings "UTF-8", 
+ * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is 
+ * serializable in all encodings that are required to be supported by all 
+ * XML parsers. When the encoding is UTF-8, whether or not a byte order mark 
+ * is serialized, or if the output is big-endian or little-endian, is 
+ * implementation dependent. When the encoding is UTF-16, whether or not the 
+ * output is big-endian or little-endian is implementation dependent, but a 
+ * Byte Order Mark must be generated for non-character outputs, such as 
+ * <code>LSOutput.byteStream</code> or <code>LSOutput.systemId</code>. If 
+ * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning 
+ * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is 
+ * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark 
+ * is not be generated. In all cases, the encoding declaration, if 
+ * generated, will correspond to the encoding used during the serialization 
+ * (e.g. <code>encoding="UTF-16"</code> will appear if UTF-16 was 
+ * requested). 
+ * <p> Namespaces are fixed up during serialization, the serialization process 
+ * will verify that namespace declarations, namespace prefixes and the 
+ * namespace URI associated with elements and attributes are consistent. If 
+ * inconsistencies are found, the serialized form of the document will be 
+ * altered to remove them. The method used for doing the namespace fixup 
+ * while serializing a document is the algorithm defined in Appendix B.1, 
+ * "Namespace normalization", of [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * . 
+ * <p> While serializing a document, the parameter "discard-default-content" 
+ * controls whether or not non-specified data is serialized. 
+ * <p> While serializing, errors and warnings are reported to the application 
+ * through the error handler (<code>LSSerializer.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+ * error-handler</a>" parameter). This specification does in no way try to define all possible 
+ * errors and warnings that can occur while serializing a DOM node, but some 
+ * common error and warning cases are defined. The types (
+ * <code>DOMError.type</code>) of errors and warnings defined by this 
+ * specification are: 
+ * <dl>
+ * <dt><code>"no-output-specified" [fatal]</code></dt>
+ * <dd> Raised when 
+ * writing to a <code>LSOutput</code> if no output is specified in the 
+ * <code>LSOutput</code>. </dd>
+ * <dt> 
+ * <code>"unbound-prefix-in-entity-reference" [fatal]</code> </dt>
+ * <dd> Raised if the 
+ * configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
+ * namespaces</a>" is set to <code>true</code> and an entity whose replacement text 
+ * contains unbound namespace prefixes is referenced in a location where 
+ * there are no bindings for the namespace prefixes. </dd>
+ * <dt>
+ * <code>"unsupported-encoding" [fatal]</code></dt>
+ * <dd> Raised if an unsupported 
+ * encoding is encountered. </dd>
+ * </dl> 
+ * <p> In addition to raising the defined errors and warnings, implementations 
+ * are expected to raise implementation specific errors and warnings for any 
+ * other error and warning cases such as IO errors (file not found, 
+ * permission denied,...) and so on. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSSerializer {
+    /**
+     *  The <code>DOMConfiguration</code> object used by the 
+     * <code>LSSerializer</code> when serializing a DOM node. 
+     * <br> In addition to the parameters recognized by the <a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
+     * DOMConfiguration</a> interface defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , the <code>DOMConfiguration</code> objects for 
+     * <code>LSSerializer</code> adds, or modifies, the following 
+     * parameters: 
+     * <dl>
+     * <dt><code>"canonical-form"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt><code>true</code></dt>
+     * <dd>[<em>optional</em>] Writes the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>]. 
+     * In addition to the behavior described in "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-canonical-form'>
+     * canonical-form</a>" [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * , setting this parameter to <code>true</code> will set the parameters 
+     * "format-pretty-print", "discard-default-content", and "xml-declaration
+     * ", to <code>false</code>. Setting one of those parameters to 
+     * <code>true</code> will set this parameter to <code>false</code>. 
+     * Serializing an XML 1.1 document when "canonical-form" is 
+     * <code>true</code> will generate a fatal error. </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Do not canonicalize the output. </dd>
+     * </dl></dd>
+     * <dt><code>"discard-default-content"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Use the <code>Attr.specified</code> attribute to decide what attributes 
+     * should be discarded. Note that some implementations might use 
+     * whatever information available to the implementation (i.e. XML 
+     * schema, DTD, the <code>Attr.specified</code> attribute, and so on) to 
+     * determine what attributes and content to discard if this parameter is 
+     * set to <code>true</code>. </dd>
+     * <dt><code>false</code></dt>
+     * <dd>[<em>required</em>]Keep all attributes and all content.</dd>
+     * </dl></dd>
+     * <dt><code>"format-pretty-print"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>optional</em>] Formatting the output by adding whitespace to produce a pretty-printed, 
+     * indented, human-readable form. The exact form of the transformations 
+     * is not specified by this specification. Pretty-printing changes the 
+     * content of the document and may affect the validity of the document, 
+     * validating implementations should preserve validity. </dd>
+     * <dt>
+     * <code>false</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) Don't pretty-print the result. </dd>
+     * </dl></dd>
+     * <dt> 
+     * <code>"ignore-unknown-character-denormalizations"</code> </dt>
+     * <dd>
+     * <dl>
+     * <dt>
+     * <code>true</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is 
+     * supported, a character is encountered for which the normalization 
+     * properties cannot be determined, then raise a 
+     * <code>"unknown-character-denormalization"</code> warning (instead of 
+     * raising an error, if this parameter is not set) and ignore any 
+     * possible denormalizations caused by these characters. </dd>
+     * <dt>
+     * <code>false</code></dt>
+     * <dd>[<em>optional</em>] Report a fatal error if a character is encountered for which the 
+     * processor cannot determine the normalization properties. </dd>
+     * </dl></dd>
+     * <dt>
+     * <code>"normalize-characters"</code></dt>
+     * <dd> This parameter is equivalent to 
+     * the one defined by <code>DOMConfiguration</code> in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+     * . Unlike in the Core, the default value for this parameter is 
+     * <code>true</code>. While DOM implementations are not required to 
+     * support <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully 
+     * normalizing</a> the characters in the document according to appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], this 
+     * parameter must be activated by default if supported. </dd>
+     * <dt>
+     * <code>"xml-declaration"</code></dt>
+     * <dd>
+     * <dl>
+     * <dt><code>true</code></dt>
+     * <dd>[<em>required</em>] (<em>default</em>) If a <code>Document</code>, <code>Element</code>, or <code>Entity</code>
+     *  node is serialized, the XML declaration, or text declaration, should 
+     * be included. The version (<code>Document.xmlVersion</code> if the 
+     * document is a Level 3 document and the version is non-null, otherwise 
+     * use the value "1.0"), and the output encoding (see 
+     * <code>LSSerializer.write</code> for details on how to find the output 
+     * encoding) are specified in the serialized XML declaration. </dd>
+     * <dt>
+     * <code>false</code></dt>
+     * <dd>[<em>required</em>] Do not serialize the XML and text declarations. Report a 
+     * <code>"xml-declaration-needed"</code> warning if this will cause 
+     * problems (i.e. the serialized data is of an XML version other than [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], or an 
+     * encoding would be needed to be able to re-parse the serialized data). </dd>
+     * </dl></dd>
+     * </dl>
+     */
+    public DOMConfiguration getDomConfig();
+
+    /**
+     *  The end-of-line sequence of characters to be used in the XML being 
+     * written out. Any string is supported, but XML treats only a certain 
+     * set of characters sequence as end-of-line (See section 2.11, 
+     * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the 
+     * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" 
+     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the 
+     * serialized content is XML 1.1). Using other character sequences than 
+     * the recommended ones can result in a document that is either not 
+     * serializable or not well-formed). 
+     * <br> On retrieval, the default value of this attribute is the 
+     * implementation specific default end-of-line sequence. DOM 
+     * implementations should choose the default to match the usual 
+     * convention for text files in the environment being used. 
+     * Implementations must choose a default sequence that matches one of 
+     * those allowed by XML 1.0 or XML 1.1, depending on the serialized 
+     * content. Setting this attribute to <code>null</code> will reset its 
+     * value to the default value. 
+     * <br> 
+     */
+    public String getNewLine();
+    /**
+     *  The end-of-line sequence of characters to be used in the XML being 
+     * written out. Any string is supported, but XML treats only a certain 
+     * set of characters sequence as end-of-line (See section 2.11, 
+     * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the 
+     * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" 
+     * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the 
+     * serialized content is XML 1.1). Using other character sequences than 
+     * the recommended ones can result in a document that is either not 
+     * serializable or not well-formed). 
+     * <br> On retrieval, the default value of this attribute is the 
+     * implementation specific default end-of-line sequence. DOM 
+     * implementations should choose the default to match the usual 
+     * convention for text files in the environment being used. 
+     * Implementations must choose a default sequence that matches one of 
+     * those allowed by XML 1.0 or XML 1.1, depending on the serialized 
+     * content. Setting this attribute to <code>null</code> will reset its 
+     * value to the default value. 
+     * <br> 
+     */
+    public void setNewLine(String newLine);
+
+    /**
+     *  When the application provides a filter, the serializer will call out 
+     * to the filter before serializing each Node. The filter implementation 
+     * can choose to remove the node from the stream or to terminate the 
+     * serialization early. 
+     * <br> The filter is invoked after the operations requested by the 
+     * <code>DOMConfiguration</code> parameters have been applied. For 
+     * example, CDATA sections won't be passed to the filter if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
+     * cdata-sections</a>" is set to <code>false</code>. 
+     */
+    public LSSerializerFilter getFilter();
+    /**
+     *  When the application provides a filter, the serializer will call out 
+     * to the filter before serializing each Node. The filter implementation 
+     * can choose to remove the node from the stream or to terminate the 
+     * serialization early. 
+     * <br> The filter is invoked after the operations requested by the 
+     * <code>DOMConfiguration</code> parameters have been applied. For 
+     * example, CDATA sections won't be passed to the filter if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
+     * cdata-sections</a>" is set to <code>false</code>. 
+     */
+    public void setFilter(LSSerializerFilter filter);
+
+    /**
+     *  Serialize the specified node as described above in the general 
+     * description of the <code>LSSerializer</code> interface. The output is 
+     * written to the supplied <code>LSOutput</code>. 
+     * <br> When writing to a <code>LSOutput</code>, the encoding is found by 
+     * looking at the encoding information that is reachable through the 
+     * <code>LSOutput</code> and the item to be written (or its owner 
+     * document) in this order: 
+     * <ol>
+     * <li> <code>LSOutput.encoding</code>, 
+     * </li>
+     * <li> 
+     * <code>Document.inputEncoding</code>, 
+     * </li>
+     * <li> 
+     * <code>Document.xmlEncoding</code>. 
+     * </li>
+     * </ol>
+     * <br> If no encoding is reachable through the above properties, a 
+     * default encoding of "UTF-8" will be used. If the specified encoding 
+     * is not supported an "unsupported-encoding" fatal error is raised. 
+     * <br> If no output is specified in the <code>LSOutput</code>, a 
+     * "no-output-specified" fatal error is raised. 
+     * <br> The implementation is responsible of associating the appropriate 
+     * media type with the serialized data. 
+     * <br> When writing to a HTTP URI, a HTTP PUT is performed. When writing 
+     * to other types of URIs, the mechanism for writing the data to the URI 
+     * is implementation dependent. 
+     * @param nodeArg  The node to serialize. 
+     * @param destination The destination for the serialized DOM.
+     * @return  Returns <code>true</code> if <code>node</code> was 
+     *   successfully serialized. Return <code>false</code> in case the 
+     *   normal processing stopped but the implementation kept serializing 
+     *   the document; the result of the serialization being implementation 
+     *   dependent then. 
+     * @exception LSException
+     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to 
+     *   serialize the node. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public boolean write(Node nodeArg, 
+                         LSOutput destination)
+                         throws LSException;
+
+    /**
+     *  A convenience method that acts as if <code>LSSerializer.write</code> 
+     * was called with a <code>LSOutput</code> with no encoding specified 
+     * and <code>LSOutput.systemId</code> set to the <code>uri</code> 
+     * argument. 
+     * @param nodeArg  The node to serialize. 
+     * @param uri The URI to write to.
+     * @return  Returns <code>true</code> if <code>node</code> was 
+     *   successfully serialized. Return <code>false</code> in case the 
+     *   normal processing stopped but the implementation kept serializing 
+     *   the document; the result of the serialization being implementation 
+     *   dependent then. 
+     * @exception LSException
+     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to 
+     *   serialize the node. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public boolean writeToURI(Node nodeArg, 
+                              String uri)
+                              throws LSException;
+
+    /**
+     *  Serialize the specified node as described above in the general 
+     * description of the <code>LSSerializer</code> interface. The output is 
+     * written to a <code>DOMString</code> that is returned to the caller. 
+     * The encoding used is the encoding of the <code>DOMString</code> type, 
+     * i.e. UTF-16. Note that no Byte Order Mark is generated in a 
+     * <code>DOMString</code> object. 
+     * @param nodeArg  The node to serialize. 
+     * @return  Returns the serialized data. 
+     * @exception DOMException
+     *    DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to 
+     *   fit in a <code>DOMString</code>. 
+     * @exception LSException
+     *    SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to 
+     *   serialize the node. DOM applications should attach a 
+     *   <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
+     *   error-handler</a>" if they wish to get details on the error. 
+     */
+    public String writeToString(Node nodeArg)
+                                throws DOMException, LSException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.ls;
+
+import org.w3c.dom.traversal.NodeFilter;
+
+/**
+ *  <code>LSSerializerFilter</code>s provide applications the ability to 
+ * examine nodes as they are being serialized and decide what nodes should 
+ * be serialized or not. The <code>LSSerializerFilter</code> interface is 
+ * based on the <code>NodeFilter</code> interface defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
+ * . 
+ * <p> <code>Document</code>, <code>DocumentType</code>, 
+ * <code>DocumentFragment</code>, <code>Notation</code>, <code>Entity</code>
+ * , and children of <code>Attr</code> nodes are not passed to the filter. 
+ * The child nodes of an <code>EntityReference</code> node are only passed 
+ * to the filter if the <code>EntityReference</code> node is skipped by the 
+ * method <code>LSParserFilter.acceptNode()</code>. 
+ * <p> When serializing an <code>Element</code>, the element is passed to the 
+ * filter before any of its attributes are passed to the filter. Namespace 
+ * declaration attributes, and default attributes (except in the case when "
+ * discard-default-content" is set to <code>false</code>), are never passed 
+ * to the filter. 
+ * <p> The result of any attempt to modify a node passed to a 
+ * <code>LSSerializerFilter</code> is implementation dependent. 
+ * <p> DOM applications must not raise exceptions in a filter. The effect of 
+ * throwing exceptions from a filter is DOM implementation dependent. 
+ * <p> For efficiency, a node passed to the filter may not be the same as the 
+ * one that is actually in the tree. And the actual node (node object 
+ * identity) may be reused during the process of filtering and serializing a 
+ * document. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
+and Save Specification</a>.
+ */
+public interface LSSerializerFilter extends NodeFilter {
+    /**
+     *  Tells the <code>LSSerializer</code> what types of nodes to show to the 
+     * filter. If a node is not shown to the filter using this attribute, it 
+     * is automatically serialized. See <code>NodeFilter</code> for 
+     * definition of the constants. The constants <code>SHOW_DOCUMENT</code>
+     * , <code>SHOW_DOCUMENT_TYPE</code>, <code>SHOW_DOCUMENT_FRAGMENT</code>
+     * , <code>SHOW_NOTATION</code>, and <code>SHOW_ENTITY</code> are 
+     * meaningless here, such nodes will never be passed to a 
+     * <code>LSSerializerFilter</code>. 
+     * <br> Unlike [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
+     * , the <code>SHOW_ATTRIBUTE</code> constant indicates that the 
+     * <code>Attr</code> nodes are shown and passed to the filter. 
+     * <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and      Range</a>]
+     * . 
+     */
+    public int getWhatToShow();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.ranges;
+
+/**
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentRange {
+    /**
+     * This interface can be obtained from the object implementing the 
+     * <code>Document</code> interface using binding-specific casting 
+     * methods.
+     * @return The initial state of the Range returned from this method is 
+     *   such that both of its boundary-points are positioned at the 
+     *   beginning of the corresponding Document, before any content. The 
+     *   Range returned can only be used to select content associated with 
+     *   this Document, or with DocumentFragments and Attrs for which this 
+     *   Document is the <code>ownerDocument</code>.
+     */
+    public Range createRange();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,416 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.ranges;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DocumentFragment;
+
+/**
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface Range {
+    /**
+     * Node within which the Range begins 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public Node getStartContainer()
+                       throws DOMException;
+
+    /**
+     * Offset within the starting node of the Range. 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public int getStartOffset()
+                       throws DOMException;
+
+    /**
+     * Node within which the Range ends 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public Node getEndContainer()
+                       throws DOMException;
+
+    /**
+     * Offset within the ending node of the Range. 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public int getEndOffset()
+                       throws DOMException;
+
+    /**
+     * TRUE if the Range is collapsed 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public boolean getCollapsed()
+                       throws DOMException;
+
+    /**
+     * The deepest common ancestor container of the Range's two 
+     * boundary-points.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public Node getCommonAncestorContainer()
+                       throws DOMException;
+
+    /**
+     * Sets the attributes describing the start of the Range. 
+     * @param refNode The <code>refNode</code> value. This parameter must be 
+     *   different from <code>null</code>.
+     * @param offset The <code>startOffset</code> value. 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor 
+     *   of <code>refNode</code> is an Entity, Notation, or DocumentType 
+     *   node.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if <code>offset</code> is negative or greater 
+     *   than the number of child units in <code>refNode</code>. Child units 
+     *   are 16-bit units if <code>refNode</code> is a type of CharacterData 
+     *   node (e.g., a Text or Comment node) or a ProcessingInstruction 
+     *   node. Child units are Nodes in all other cases.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setStart(Node refNode, 
+                         int offset)
+                         throws RangeException, DOMException;
+
+    /**
+     * Sets the attributes describing the end of a Range.
+     * @param refNode The <code>refNode</code> value. This parameter must be 
+     *   different from <code>null</code>.
+     * @param offset The <code>endOffset</code> value. 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor 
+     *   of <code>refNode</code> is an Entity, Notation, or DocumentType 
+     *   node.
+     * @exception DOMException
+     *   INDEX_SIZE_ERR: Raised if <code>offset</code> is negative or greater 
+     *   than the number of child units in <code>refNode</code>. Child units 
+     *   are 16-bit units if <code>refNode</code> is a type of CharacterData 
+     *   node (e.g., a Text or Comment node) or a ProcessingInstruction 
+     *   node. Child units are Nodes in all other cases.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setEnd(Node refNode, 
+                       int offset)
+                       throws RangeException, DOMException;
+
+    /**
+     * Sets the start position to be before a node
+     * @param refNode Range starts before <code>refNode</code> 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if the root container of 
+     *   <code>refNode</code> is not an Attr, Document, or DocumentFragment 
+     *   node or if <code>refNode</code> is a Document, DocumentFragment, 
+     *   Attr, Entity, or Notation node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setStartBefore(Node refNode)
+                               throws RangeException, DOMException;
+
+    /**
+     * Sets the start position to be after a node
+     * @param refNode Range starts after <code>refNode</code> 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if the root container of 
+     *   <code>refNode</code> is not an Attr, Document, or DocumentFragment 
+     *   node or if <code>refNode</code> is a Document, DocumentFragment, 
+     *   Attr, Entity, or Notation node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setStartAfter(Node refNode)
+                              throws RangeException, DOMException;
+
+    /**
+     * Sets the end position to be before a node. 
+     * @param refNode Range ends before <code>refNode</code> 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if the root container of 
+     *   <code>refNode</code> is not an Attr, Document, or DocumentFragment 
+     *   node or if <code>refNode</code> is a Document, DocumentFragment, 
+     *   Attr, Entity, or Notation node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setEndBefore(Node refNode)
+                             throws RangeException, DOMException;
+
+    /**
+     * Sets the end of a Range to be after a node 
+     * @param refNode Range ends after <code>refNode</code>. 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if the root container of 
+     *   <code>refNode</code> is not an Attr, Document or DocumentFragment 
+     *   node or if <code>refNode</code> is a Document, DocumentFragment, 
+     *   Attr, Entity, or Notation node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void setEndAfter(Node refNode)
+                            throws RangeException, DOMException;
+
+    /**
+     * Collapse a Range onto one of its boundary-points 
+     * @param toStart If TRUE, collapses the Range onto its start; if FALSE, 
+     *   collapses it onto its end. 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public void collapse(boolean toStart)
+                         throws DOMException;
+
+    /**
+     * Select a node and its contents 
+     * @param refNode The node to select. 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if an ancestor of <code>refNode</code> 
+     *   is an Entity, Notation or DocumentType node or if 
+     *   <code>refNode</code> is a Document, DocumentFragment, Attr, Entity, 
+     *   or Notation node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void selectNode(Node refNode)
+                           throws RangeException, DOMException;
+
+    /**
+     * Select the contents within a node 
+     * @param refNode Node to select from 
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor 
+     *   of <code>refNode</code> is an Entity, Notation or DocumentType node.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created 
+     *   from a different document than the one that created this range.
+     */
+    public void selectNodeContents(Node refNode)
+                                   throws RangeException, DOMException;
+
+    // CompareHow
+    /**
+     * Compare start boundary-point of <code>sourceRange</code> to start 
+     * boundary-point of Range on which <code>compareBoundaryPoints</code> 
+     * is invoked.
+     */
+    public static final short START_TO_START            = 0;
+    /**
+     * Compare start boundary-point of <code>sourceRange</code> to end 
+     * boundary-point of Range on which <code>compareBoundaryPoints</code> 
+     * is invoked.
+     */
+    public static final short START_TO_END              = 1;
+    /**
+     * Compare end boundary-point of <code>sourceRange</code> to end 
+     * boundary-point of Range on which <code>compareBoundaryPoints</code> 
+     * is invoked.
+     */
+    public static final short END_TO_END                = 2;
+    /**
+     * Compare end boundary-point of <code>sourceRange</code> to start 
+     * boundary-point of Range on which <code>compareBoundaryPoints</code> 
+     * is invoked.
+     */
+    public static final short END_TO_START              = 3;
+
+    /**
+     * Compare the boundary-points of two Ranges in a document.
+     * @param how A code representing the type of comparison, as defined 
+     *   above.
+     * @param sourceRange The <code>Range</code> on which this current 
+     *   <code>Range</code> is compared to.
+     * @return  -1, 0 or 1 depending on whether the corresponding 
+     *   boundary-point of the Range is respectively before, equal to, or 
+     *   after the corresponding boundary-point of <code>sourceRange</code>. 
+     * @exception DOMException
+     *   WRONG_DOCUMENT_ERR: Raised if the two Ranges are not in the same 
+     *   Document or DocumentFragment.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     */
+    public short compareBoundaryPoints(short how, 
+                                       Range sourceRange)
+                                       throws DOMException;
+
+    /**
+     * Removes the contents of a Range from the containing document or 
+     * document fragment without returning a reference to the removed 
+     * content.  
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of 
+     *   the Range is read-only or any of the nodes that contain any of the 
+     *   content of the Range are read-only.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     */
+    public void deleteContents()
+                               throws DOMException;
+
+    /**
+     * Moves the contents of a Range from the containing document or document 
+     * fragment to a new DocumentFragment. 
+     * @return A DocumentFragment containing the extracted contents. 
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of 
+     *   the Range is read-only or any of the nodes which contain any of the 
+     *   content of the Range are read-only.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be 
+     *   extracted into the new DocumentFragment.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     */
+    public DocumentFragment extractContents()
+                                            throws DOMException;
+
+    /**
+     * Duplicates the contents of a Range 
+     * @return A DocumentFragment that contains content equivalent to this 
+     *   Range.
+     * @exception DOMException
+     *   HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be 
+     *   extracted into the new DocumentFragment.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     */
+    public DocumentFragment cloneContents()
+                                          throws DOMException;
+
+    /**
+     * Inserts a node into the Document or DocumentFragment at the start of 
+     * the Range. If the container is a Text node, this will be split at the 
+     * start of the Range (as if the Text node's splitText method was 
+     * performed at the insertion point) and the insertion will occur 
+     * between the two resulting Text nodes. Adjacent Text nodes will not be 
+     * automatically merged. If the node to be inserted is a 
+     * DocumentFragment node, the children will be inserted rather than the 
+     * DocumentFragment node itself.
+     * @param newNode The node to insert at the start of the Range 
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of the 
+     *   start of the Range is read-only.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>newNode</code> and the 
+     *   container of the start of the Range were not created from the same 
+     *   document.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if the container of the start of 
+     *   the Range is of a type that does not allow children of the type of 
+     *   <code>newNode</code> or if <code>newNode</code> is an ancestor of 
+     *   the container.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     * @exception RangeException
+     *   INVALID_NODE_TYPE_ERR: Raised if <code>newNode</code> is an Attr, 
+     *   Entity, Notation, or Document node.
+     */
+    public void insertNode(Node newNode)
+                           throws DOMException, RangeException;
+
+    /**
+     * Reparents the contents of the Range to the given node and inserts the 
+     * node at the position of the start of the Range. 
+     * @param newParent The node to surround the contents with. 
+     * @exception DOMException
+     *   NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of 
+     *   either boundary-point of the Range is read-only.
+     *   <br>WRONG_DOCUMENT_ERR: Raised if <code> newParent</code> and the 
+     *   container of the start of the Range were not created from the same 
+     *   document.
+     *   <br>HIERARCHY_REQUEST_ERR: Raised if the container of the start of 
+     *   the Range is of a type that does not allow children of the type of 
+     *   <code>newParent</code> or if <code>newParent</code> is an ancestor 
+     *   of the container or if <code>node</code> would end up with a child 
+     *   node of a type not allowed by the type of <code>node</code>.
+     *   <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already 
+     *   been invoked on this object.
+     * @exception RangeException
+     *   BAD_BOUNDARYPOINTS_ERR: Raised if the Range partially selects a 
+     *   non-text node.
+     *   <br>INVALID_NODE_TYPE_ERR: Raised if <code> node</code> is an Attr, 
+     *   Entity, DocumentType, Notation, Document, or DocumentFragment node.
+     */
+    public void surroundContents(Node newParent)
+                                 throws DOMException, RangeException;
+
+    /**
+     * Produces a new Range whose boundary-points are equal to the 
+     * boundary-points of the Range. 
+     * @return The duplicated Range. 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public Range cloneRange()
+                            throws DOMException;
+
+    /**
+     * Returns the contents of a Range as a string. This string contains only 
+     * the data characters, not any markup. 
+     * @return The contents of the Range.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public String toString()
+                           throws DOMException;
+
+    /**
+     * Called to indicate that the Range is no longer in use and that the 
+     * implementation may relinquish any resources associated with this 
+     * Range. Subsequent calls to any methods or attribute getters on this 
+     * Range will result in a <code>DOMException</code> being thrown with an 
+     * error code of <code>INVALID_STATE_ERR</code>.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if <code>detach()</code> has already been 
+     *   invoked on this object.
+     */
+    public void detach()
+                       throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.ranges;
+
+/**
+ * Range operations may throw a <code>RangeException</code> as specified in 
+ * their method descriptions.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public class RangeException extends RuntimeException {
+    public RangeException(short code, String message) {
+       super(message);
+       this.code = code;
+    }
+    public short   code;
+    // RangeExceptionCode
+    /**
+     * If the boundary-points of a Range do not meet specific requirements.
+     */
+    public static final short BAD_BOUNDARYPOINTS_ERR    = 1;
+    /**
+     * If the container of an boundary-point of a Range is being set to either 
+     * a node of an invalid type or a node with an ancestor of an invalid 
+     * type.
+     */
+    public static final short INVALID_NODE_TYPE_ERR     = 2;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.stylesheets;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentStyle {
+    /**
+     *  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  LINK element, and inline  STYLE 
+     * elements. In XML, this includes external style sheets, included via 
+     * style sheet processing instructions (see [XML StyleSheet]). 
+     */
+    public StyleSheetList getStyleSheets();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.stylesheets;
+
+/**
+ *  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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface LinkStyle {
+    /**
+     *  The style sheet. 
+     */
+    public StyleSheet getSheet();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.stylesheets;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *  The <code>MediaList</code> interface provides the abstraction of an 
+ * ordered collection of media, 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> The items in the <code>MediaList</code> are accessible via an integral 
+ * index, starting from 0. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface MediaList {
+    /**
+     *  The parsable textual representation of the media list. This is a 
+     * comma-separated list of media. 
+     */
+    public String getMediaText();
+    /**
+     *  The parsable textual representation of the media list. This is a 
+     * comma-separated list of media. 
+     * @exception DOMException
+     *   SYNTAX_ERR: Raised if the specified string value has a syntax error 
+     *   and is unparsable.
+     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is 
+     *   readonly.
+     */
+    public void setMediaText(String mediaText)
+                             throws DOMException;
+
+    /**
+     *  The number of media in the list. The range of valid media is 
+     * <code>0</code> to <code>length-1</code> inclusive. 
+     */
+    public int getLength();
+
+    /**
+     *  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>. 
+     * @param index  Index into the collection. 
+     * @return  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. 
+     */
+    public String item(int index);
+
+    /**
+     *  Deletes the medium indicated by <code>oldMedium</code> from the list. 
+     * @param oldMedium The medium to delete in the media list.
+     * @exception DOMException
+     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. 
+     *   <br> NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not in the 
+     *   list. 
+     */
+    public void deleteMedium(String oldMedium)
+                             throws DOMException;
+
+    /**
+     *  Adds the medium <code>newMedium</code> to the end of the list. If the 
+     * <code>newMedium</code> is already used, it is first removed. 
+     * @param newMedium The new medium to add.
+     * @exception DOMException
+     *    INVALID_CHARACTER_ERR: If the medium contains characters that are 
+     *   invalid in the underlying style language. 
+     *   <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. 
+     */
+    public void appendMedium(String newMedium)
+                             throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.stylesheets;
+
+import org.w3c.dom.Node;
+
+/**
+ *  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  LINK element, or 
+ * an inline  STYLE element. In XML, this interface represents an external 
+ * style sheet, included via a style sheet processing instruction. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface StyleSheet {
+    /**
+     *  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 content type is often specified in the 
+     * <code>ownerNode</code>. Also see the type attribute definition for 
+     * the <code>LINK</code> element in HTML 4.0, and the type 
+     * pseudo-attribute for the XML style sheet processing instruction. 
+     */
+    public String getType();
+
+    /**
+     *  <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. 
+     */
+    public boolean getDisabled();
+    /**
+     *  <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. 
+     */
+    public void setDisabled(boolean disabled);
+
+    /**
+     *  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>. 
+     */
+    public Node getOwnerNode();
+
+    /**
+     *  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>. 
+     */
+    public StyleSheet getParentStyleSheet();
+
+    /**
+     *  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 href attribute definition for the 
+     * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute 
+     * for the XML style sheet processing instruction. 
+     */
+    public String getHref();
+
+    /**
+     *  The advisory title. The title is often specified in the 
+     * <code>ownerNode</code>. See the title attribute definition for the 
+     * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute 
+     * for the XML style sheet processing instruction. 
+     */
+    public String getTitle();
+
+    /**
+     *  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 media 
+     * attribute definition for the <code>LINK</code> element in HTML 4.0, 
+     * and the media pseudo-attribute for the XML style sheet processing 
+     * instruction . Modifying the media list may cause a change to the 
+     * attribute <code>disabled</code>. 
+     */
+    public MediaList getMedia();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.stylesheets;
+
+/**
+ * The <code>StyleSheetList</code> interface provides the abstraction of an 
+ * ordered collection of style sheets. 
+ * <p> The items in the <code>StyleSheetList</code> are accessible via an 
+ * integral index, starting from 0. 
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
+ * @since DOM Level 2
+ */
+public interface StyleSheetList {
+    /**
+     *  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. 
+     */
+    public int getLength();
+
+    /**
+     *  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>. 
+     * @param index Index into the collection
+     * @return 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. 
+     */
+    public StyleSheet item(int index);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.traversal;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ * <code>DocumentTraversal</code> contains methods that create 
+ * <code>NodeIterators</code> and <code>TreeWalkers</code> to traverse a 
+ * node and its children in document order (depth first, pre-order 
+ * traversal, which is equivalent to the order in which the start tags occur 
+ * in the text representation of the document). In DOMs which support the 
+ * Traversal feature, <code>DocumentTraversal</code> will be implemented by 
+ * the same objects that implement the Document interface.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentTraversal {
+    /**
+     * Create a new <code>NodeIterator</code> over the subtree rooted at the 
+     * specified node.
+     * @param root The node which will be iterated together with its 
+     *   children. The <code>NodeIterator</code> is initially positioned 
+     *   just before this node. The <code>whatToShow</code> flags and the 
+     *   filter, if any, are not considered when setting this position. The 
+     *   root must not be <code>null</code>.
+     * @param whatToShow This flag specifies which node types may appear in 
+     *   the logical view of the tree presented by the 
+     *   <code>NodeIterator</code>. See the description of 
+     *   <code>NodeFilter</code> for the set of possible <code>SHOW_</code> 
+     *   values.These flags can be combined using <code>OR</code>.
+     * @param filter The <code>NodeFilter</code> to be used with this 
+     *   <code>NodeIterator</code>, or <code>null</code> to indicate no 
+     *   filter.
+     * @param entityReferenceExpansion The value of this flag determines 
+     *   whether entity reference nodes are expanded.
+     * @return The newly created <code>NodeIterator</code>.
+     * @exception DOMException
+     *   NOT_SUPPORTED_ERR: Raised if the specified <code>root</code> is 
+     *   <code>null</code>.
+     */
+    public NodeIterator createNodeIterator(Node root, 
+                                           int whatToShow, 
+                                           NodeFilter filter, 
+                                           boolean entityReferenceExpansion)
+                                           throws DOMException;
+
+    /**
+     * Create a new <code>TreeWalker</code> over the subtree rooted at the 
+     * specified node.
+     * @param root The node which will serve as the <code>root</code> for the 
+     *   <code>TreeWalker</code>. The <code>whatToShow</code> flags and the 
+     *   <code>NodeFilter</code> are not considered when setting this value; 
+     *   any node type will be accepted as the <code>root</code>. The 
+     *   <code>currentNode</code> of the <code>TreeWalker</code> is 
+     *   initialized to this node, whether or not it is visible. The 
+     *   <code>root</code> functions as a stopping point for traversal 
+     *   methods that look upward in the document structure, such as 
+     *   <code>parentNode</code> and nextNode. The <code>root</code> must 
+     *   not be <code>null</code>.
+     * @param whatToShow This flag specifies which node types may appear in 
+     *   the logical view of the tree presented by the 
+     *   <code>TreeWalker</code>. See the description of 
+     *   <code>NodeFilter</code> for the set of possible <code>SHOW_</code> 
+     *   values.These flags can be combined using <code>OR</code>.
+     * @param filter The <code>NodeFilter</code> to be used with this 
+     *   <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
+     * @param entityReferenceExpansion If this flag is false, the contents of 
+     *   <code>EntityReference</code> nodes are not presented in the logical 
+     *   view.
+     * @return The newly created <code>TreeWalker</code>.
+     * @exception DOMException
+     *    NOT_SUPPORTED_ERR: Raised if the specified <code>root</code> is 
+     *   <code>null</code>.
+     */
+    public TreeWalker createTreeWalker(Node root, 
+                                       int whatToShow, 
+                                       NodeFilter filter, 
+                                       boolean entityReferenceExpansion)
+                                       throws DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.traversal;
+
+import org.w3c.dom.Node;
+
+/**
+ * Filters are objects that know how to "filter out" nodes. If a 
+ * <code>NodeIterator</code> or <code>TreeWalker</code> is given a 
+ * <code>NodeFilter</code>, it applies the filter before it returns the next 
+ * node. If the filter says to accept the node, the traversal logic returns 
+ * it; otherwise, traversal looks for the next node and pretends that the 
+ * node that was rejected was not there.
+ * <p>The DOM does not provide any filters. <code>NodeFilter</code> is just an 
+ * interface that users can implement to provide their own filters. 
+ * <p><code>NodeFilters</code> do not need to know how to traverse from node 
+ * to node, nor do they need to know anything about the data structure that 
+ * is being traversed. This makes it very easy to write filters, since the 
+ * only thing they have to know how to do is evaluate a single node. One 
+ * filter may be used with a number of different kinds of traversals, 
+ * encouraging code reuse.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface NodeFilter {
+    // Constants returned by acceptNode
+    /**
+     * Accept the node. Navigation methods defined for 
+     * <code>NodeIterator</code> or <code>TreeWalker</code> will return this 
+     * node.
+     */
+    public static final short FILTER_ACCEPT             = 1;
+    /**
+     * Reject the node. Navigation methods defined for 
+     * <code>NodeIterator</code> or <code>TreeWalker</code> will not return 
+     * this node. For <code>TreeWalker</code>, the children of this node 
+     * will also be rejected. <code>NodeIterators</code> treat this as a 
+     * synonym for <code>FILTER_SKIP</code>.
+     */
+    public static final short FILTER_REJECT             = 2;
+    /**
+     * Skip this single node. Navigation methods defined for 
+     * <code>NodeIterator</code> or <code>TreeWalker</code> will not return 
+     * this node. For both <code>NodeIterator</code> and 
+     * <code>TreeWalker</code>, the children of this node will still be 
+     * considered. 
+     */
+    public static final short FILTER_SKIP               = 3;
+
+    // Constants for whatToShow
+    /**
+     * Show all <code>Nodes</code>.
+     */
+    public static final int SHOW_ALL                  = 0xFFFFFFFF;
+    /**
+     * Show <code>Element</code> nodes.
+     */
+    public static final int SHOW_ELEMENT              = 0x00000001;
+    /**
+     * Show <code>Attr</code> nodes. This is meaningful only when creating an 
+     * <code>NodeIterator</code> or <code>TreeWalker</code> with an 
+     * attribute node as its <code>root</code>; in this case, it means that 
+     * the attribute node will appear in the first position of the iteration 
+     * or traversal. Since attributes are never children of other nodes, 
+     * they do not appear when traversing over the document tree.
+     */
+    public static final int SHOW_ATTRIBUTE            = 0x00000002;
+    /**
+     * Show <code>Text</code> nodes.
+     */
+    public static final int SHOW_TEXT                 = 0x00000004;
+    /**
+     * Show <code>CDATASection</code> nodes.
+     */
+    public static final int SHOW_CDATA_SECTION        = 0x00000008;
+    /**
+     * Show <code>EntityReference</code> nodes.
+     */
+    public static final int SHOW_ENTITY_REFERENCE     = 0x00000010;
+    /**
+     * Show <code>Entity</code> nodes. This is meaningful only when creating 
+     * an <code>NodeIterator</code> or <code>TreeWalker</code> with an 
+     * <code>Entity</code> node as its <code>root</code>; in this case, it 
+     * means that the <code>Entity</code> node will appear in the first 
+     * position of the traversal. Since entities are not part of the 
+     * document tree, they do not appear when traversing over the document 
+     * tree.
+     */
+    public static final int SHOW_ENTITY               = 0x00000020;
+    /**
+     * Show <code>ProcessingInstruction</code> nodes.
+     */
+    public static final int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+    /**
+     * Show <code>Comment</code> nodes.
+     */
+    public static final int SHOW_COMMENT              = 0x00000080;
+    /**
+     * Show <code>Document</code> nodes.
+     */
+    public static final int SHOW_DOCUMENT             = 0x00000100;
+    /**
+     * Show <code>DocumentType</code> nodes.
+     */
+    public static final int SHOW_DOCUMENT_TYPE        = 0x00000200;
+    /**
+     * Show <code>DocumentFragment</code> nodes.
+     */
+    public static final int SHOW_DOCUMENT_FRAGMENT    = 0x00000400;
+    /**
+     * Show <code>Notation</code> nodes. This is meaningful only when creating 
+     * an <code>NodeIterator</code> or <code>TreeWalker</code> with a 
+     * <code>Notation</code> node as its <code>root</code>; in this case, it 
+     * means that the <code>Notation</code> node will appear in the first 
+     * position of the traversal. Since notations are not part of the 
+     * document tree, they do not appear when traversing over the document 
+     * tree.
+     */
+    public static final int SHOW_NOTATION             = 0x00000800;
+
+    /**
+     * Test whether a specified node is visible in the logical view of a 
+     * <code>TreeWalker</code> or <code>NodeIterator</code>. This function 
+     * will be called by the implementation of <code>TreeWalker</code> and 
+     * <code>NodeIterator</code>; it is not normally called directly from 
+     * user code. (Though you could do so if you wanted to use the same 
+     * filter to guide your own application logic.)
+     * @param n The node to check to see if it passes the filter or not.
+     * @return A constant to determine whether the node is accepted, 
+     *   rejected, or skipped, as defined above.
+     */
+    public short acceptNode(Node n);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.traversal;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ * <code>NodeIterators</code> are used to step through a set of nodes, e.g. 
+ * the set of nodes in a <code>NodeList</code>, the document subtree 
+ * governed by a particular <code>Node</code>, the results of a query, or 
+ * any other set of nodes. The set of nodes to be iterated is determined by 
+ * the implementation of the <code>NodeIterator</code>. DOM Level 2 
+ * specifies a single <code>NodeIterator</code> implementation for 
+ * document-order traversal of a document subtree. Instances of these 
+ * <code>NodeIterators</code> are created by calling 
+ * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface NodeIterator {
+    /**
+     * The root node of the <code>NodeIterator</code>, as specified when it 
+     * was created.
+     */
+    public Node getRoot();
+
+    /**
+     * This attribute determines which node types are presented via the 
+     * <code>NodeIterator</code>. The available set of constants is defined 
+     * in the <code>NodeFilter</code> interface.  Nodes not accepted by 
+     * <code>whatToShow</code> will be skipped, but their children may still 
+     * be considered. Note that this skip takes precedence over the filter, 
+     * if any. 
+     */
+    public int getWhatToShow();
+
+    /**
+     * The <code>NodeFilter</code> used to screen nodes.
+     */
+    public NodeFilter getFilter();
+
+    /**
+     *  The value of this flag determines whether the children of entity 
+     * reference nodes are visible to the <code>NodeIterator</code>. If 
+     * false, these children  and their descendants will be rejected. Note 
+     * that this rejection takes precedence over <code>whatToShow</code> and 
+     * the filter. Also note that this is currently the only situation where 
+     * <code>NodeIterators</code> may reject a complete subtree rather than 
+     * skipping individual nodes. 
+     * <br>
+     * <br> To produce a view of the document that has entity references 
+     * expanded and does not expose the entity reference node itself, use 
+     * the <code>whatToShow</code> flags to hide the entity reference node 
+     * and set <code>expandEntityReferences</code> to true when creating the 
+     * <code>NodeIterator</code>. To produce a view of the document that has 
+     * entity reference nodes but no entity expansion, use the 
+     * <code>whatToShow</code> flags to show the entity reference node and 
+     * set <code>expandEntityReferences</code> to false.
+     */
+    public boolean getExpandEntityReferences();
+
+    /**
+     * Returns the next node in the set and advances the position of the 
+     * <code>NodeIterator</code> in the set. After a 
+     * <code>NodeIterator</code> is created, the first call to 
+     * <code>nextNode()</code> returns the first node in the set.
+     * @return The next <code>Node</code> in the set being iterated over, or 
+     *   <code>null</code> if there are no more members in that set.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if this method is called after the 
+     *   <code>detach</code> method was invoked.
+     */
+    public Node nextNode()
+                         throws DOMException;
+
+    /**
+     * Returns the previous node in the set and moves the position of the 
+     * <code>NodeIterator</code> backwards in the set.
+     * @return The previous <code>Node</code> in the set being iterated over, 
+     *   or <code>null</code> if there are no more members in that set. 
+     * @exception DOMException
+     *   INVALID_STATE_ERR: Raised if this method is called after the 
+     *   <code>detach</code> method was invoked.
+     */
+    public Node previousNode()
+                             throws DOMException;
+
+    /**
+     * Detaches the <code>NodeIterator</code> from the set which it iterated 
+     * over, releasing any computational resources and placing the 
+     * <code>NodeIterator</code> in the INVALID state. After 
+     * <code>detach</code> has been invoked, calls to <code>nextNode</code> 
+     * or <code>previousNode</code> will raise the exception 
+     * INVALID_STATE_ERR.
+     */
+    public void detach();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.traversal;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ * <code>TreeWalker</code> objects are used to navigate a document tree or 
+ * subtree using the view of the document defined by their 
+ * <code>whatToShow</code> flags and filter (if any). Any function which 
+ * performs navigation using a <code>TreeWalker</code> will automatically 
+ * support any view defined by a <code>TreeWalker</code>.
+ * <p>Omitting nodes from the logical view of a subtree can result in a 
+ * structure that is substantially different from the same subtree in the 
+ * complete, unfiltered document. Nodes that are siblings in the 
+ * <code>TreeWalker</code> view may be children of different, widely 
+ * separated nodes in the original view. For instance, consider a 
+ * <code>NodeFilter</code> that skips all nodes except for Text nodes and 
+ * the root node of a document. In the logical view that results, all text 
+ * nodes will be siblings and appear as direct children of the root node, no 
+ * matter how deeply nested the structure of the original document.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
+ * @since DOM Level 2
+ */
+public interface TreeWalker {
+    /**
+     * The <code>root</code> node of the <code>TreeWalker</code>, as specified 
+     * when it was created.
+     */
+    public Node getRoot();
+
+    /**
+     * This attribute determines which node types are presented via the 
+     * <code>TreeWalker</code>. The available set of constants is defined in 
+     * the <code>NodeFilter</code> interface.  Nodes not accepted by 
+     * <code>whatToShow</code> will be skipped, but their children may still 
+     * be considered. Note that this skip takes precedence over the filter, 
+     * if any. 
+     */
+    public int getWhatToShow();
+
+    /**
+     * The filter used to screen nodes.
+     */
+    public NodeFilter getFilter();
+
+    /**
+     * The value of this flag determines whether the children of entity 
+     * reference nodes are visible to the <code>TreeWalker</code>. If false, 
+     * these children  and their descendants will be rejected. Note that 
+     * this rejection takes precedence over <code>whatToShow</code> and the 
+     * filter, if any. 
+     * <br> To produce a view of the document that has entity references 
+     * expanded and does not expose the entity reference node itself, use 
+     * the <code>whatToShow</code> flags to hide the entity reference node 
+     * and set <code>expandEntityReferences</code> to true when creating the 
+     * <code>TreeWalker</code>. To produce a view of the document that has 
+     * entity reference nodes but no entity expansion, use the 
+     * <code>whatToShow</code> flags to show the entity reference node and 
+     * set <code>expandEntityReferences</code> to false.
+     */
+    public boolean getExpandEntityReferences();
+
+    /**
+     * The node at which the <code>TreeWalker</code> is currently positioned.
+     * <br>Alterations to the DOM tree may cause the current node to no longer 
+     * be accepted by the <code>TreeWalker</code>'s associated filter. 
+     * <code>currentNode</code> may also be explicitly set to any node, 
+     * whether or not it is within the subtree specified by the 
+     * <code>root</code> node or would be accepted by the filter and 
+     * <code>whatToShow</code> flags. Further traversal occurs relative to 
+     * <code>currentNode</code> even if it is not part of the current view, 
+     * by applying the filters in the requested direction; if no traversal 
+     * is possible, <code>currentNode</code> is not changed. 
+     */
+    public Node getCurrentNode();
+    /**
+     * The node at which the <code>TreeWalker</code> is currently positioned.
+     * <br>Alterations to the DOM tree may cause the current node to no longer 
+     * be accepted by the <code>TreeWalker</code>'s associated filter. 
+     * <code>currentNode</code> may also be explicitly set to any node, 
+     * whether or not it is within the subtree specified by the 
+     * <code>root</code> node or would be accepted by the filter and 
+     * <code>whatToShow</code> flags. Further traversal occurs relative to 
+     * <code>currentNode</code> even if it is not part of the current view, 
+     * by applying the filters in the requested direction; if no traversal 
+     * is possible, <code>currentNode</code> is not changed. 
+     * @exception DOMException
+     *   NOT_SUPPORTED_ERR: Raised if an attempt is made to set 
+     *   <code>currentNode</code> to <code>null</code>.
+     */
+    public void setCurrentNode(Node currentNode)
+                         throws DOMException;
+
+    /**
+     * Moves to and returns the closest visible ancestor node of the current 
+     * node. If the search for <code>parentNode</code> attempts to step 
+     * upward from the <code>TreeWalker</code>'s <code>root</code> node, or 
+     * if it fails to find a visible ancestor node, this method retains the 
+     * current position and returns <code>null</code>.
+     * @return The new parent node, or <code>null</code> if the current node 
+     *   has no parent  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node parentNode();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the first visible child of the 
+     * current node, and returns the new node. If the current node has no 
+     * visible children, returns <code>null</code>, and retains the current 
+     * node.
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   visible children  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node firstChild();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the last visible child of the 
+     * current node, and returns the new node. If the current node has no 
+     * visible children, returns <code>null</code>, and retains the current 
+     * node.
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   children  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node lastChild();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the previous sibling of the 
+     * current node, and returns the new node. If the current node has no 
+     * visible previous sibling, returns <code>null</code>, and retains the 
+     * current node.
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   previous sibling.  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node previousSibling();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the next sibling of the current 
+     * node, and returns the new node. If the current node has no visible 
+     * next sibling, returns <code>null</code>, and retains the current node.
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   next sibling.  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node nextSibling();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the previous visible node in 
+     * document order relative to the current node, and returns the new 
+     * node. If the current node has no previous node,  or if the search for 
+     * <code>previousNode</code> attempts to step upward from the 
+     * <code>TreeWalker</code>'s <code>root</code> node,  returns 
+     * <code>null</code>, and retains the current node. 
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   previous node  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node previousNode();
+
+    /**
+     * Moves the <code>TreeWalker</code> to the next visible node in document 
+     * order relative to the current node, and returns the new node. If the 
+     * current node has no next node, or if the search for nextNode attempts 
+     * to step upward from the <code>TreeWalker</code>'s <code>root</code> 
+     * node, returns <code>null</code>, and retains the current node.
+     * @return The new node, or <code>null</code> if the current node has no 
+     *   next node  in the <code>TreeWalker</code>'s logical view.  
+     */
+    public Node nextNode();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.views;
+
+/**
+ * A base interface that all views shall derive from.
+ * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>.
+ * @since DOM Level 2
+ */
+public interface AbstractView {
+    /**
+     * The source <code>DocumentView</code> of which this is an 
+     * <code>AbstractView</code>.
+     */
+    public DocumentView getDocument();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+package org.w3c.dom.views;
+
+/**
+ * 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>.
+ * @since DOM Level 2
+ */
+public interface DocumentView {
+    /**
+     * The default <code>AbstractView</code> for this <code>Document</code>, 
+     * or <code>null</code> if none available.
+     */
+    public AbstractView getDefaultView();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ *  The evaluation of XPath expressions is provided by 
+ * <code>XPathEvaluator</code>. In a DOM implementation which supports the 
+ * XPath 3.0 feature, as described above, the <code>XPathEvaluator</code> 
+ * interface will be implemented on the same object which implements the 
+ * <code>Document</code> interface permitting it to be obtained by the usual 
+ * binding-specific method such as casting or by using the DOM Level 3 
+ * getInterface method. In this case the implementation obtained from the 
+ * Document supports the XPath DOM module and is compatible with the XPath 
+ * 1.0 specification. 
+ * <p>Evaluation of expressions with specialized extension functions or 
+ * variables may not work in all implementations and is, therefore, not 
+ * portable. <code>XPathEvaluator</code> implementations may be available 
+ * from other sources that could provide specific support for specialized 
+ * extension functions or variables as would be defined by other 
+ * specifications. 
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public interface XPathEvaluator {
+    /**
+     * Creates a parsed XPath expression with resolved namespaces. This is 
+     * useful when an expression will be reused in an application since it 
+     * makes it possible to compile the expression string into a more 
+     * efficient internal form and preresolve all namespace prefixes which 
+     * occur within the expression.
+     * @param expression The XPath expression string to be parsed.
+     * @param resolver The <code>resolver</code> permits translation of all 
+     *   prefixes, including the <code>xml</code> namespace prefix, within 
+     *   the XPath expression into appropriate namespace URIs. If this is 
+     *   specified as <code>null</code>, any namespace prefix within the 
+     *   expression will result in <code>DOMException</code> being thrown 
+     *   with the code <code>NAMESPACE_ERR</code>.
+     * @return The compiled form of the XPath expression.
+     * @exception XPathException
+     *   INVALID_EXPRESSION_ERR: Raised if the expression is not legal 
+     *   according to the rules of the <code>XPathEvaluator</code>.
+     * @exception DOMException
+     *   NAMESPACE_ERR: Raised if the expression contains namespace prefixes 
+     *   which cannot be resolved by the specified 
+     *   <code>XPathNSResolver</code>.
+     */
+    public XPathExpression createExpression(String expression, 
+                                            XPathNSResolver resolver)
+                                            throws XPathException, DOMException;
+
+    /**
+     * Adapts any DOM node to resolve namespaces so that an XPath expression 
+     * can be easily evaluated relative to the context of the node where it 
+     * appeared within the document. This adapter works like the DOM Level 3 
+     * method <code>lookupNamespaceURI</code> on nodes in resolving the 
+     * namespaceURI from a given prefix using the current information 
+     * available in the node's hierarchy at the time lookupNamespaceURI is 
+     * called. also correctly resolving the implicit xml prefix.
+     * @param nodeResolver The node to be used as a context for namespace 
+     *   resolution.
+     * @return <code>XPathNSResolver</code> which resolves namespaces with 
+     *   respect to the definitions in scope for a specified node.
+     */
+    public XPathNSResolver createNSResolver(Node nodeResolver);
+
+    /**
+     * Evaluates an XPath expression string and returns a result of the 
+     * specified type if possible.
+     * @param expression The XPath expression string to be parsed and 
+     *   evaluated.
+     * @param contextNode The <code>context</code> is context node for the 
+     *   evaluation of this XPath expression. If the XPathEvaluator was 
+     *   obtained by casting the <code>Document</code> then this must be 
+     *   owned by the same document and must be a <code>Document</code>, 
+     *   <code>Element</code>, <code>Attribute</code>, <code>Text</code>, 
+     *   <code>CDATASection</code>, <code>Comment</code>, 
+     *   <code>ProcessingInstruction</code>, or <code>XPathNamespace</code> 
+     *   node. If the context node is a <code>Text</code> or a 
+     *   <code>CDATASection</code>, then the context is interpreted as the 
+     *   whole logical text node as seen by XPath, unless the node is empty 
+     *   in which case it may not serve as the XPath context.
+     * @param resolver The <code>resolver</code> permits translation of all 
+     *   prefixes, including the <code>xml</code> namespace prefix, within 
+     *   the XPath expression into appropriate namespace URIs. If this is 
+     *   specified as <code>null</code>, any namespace prefix within the 
+     *   expression will result in <code>DOMException</code> being thrown 
+     *   with the code <code>NAMESPACE_ERR</code>.
+     * @param type If a specific <code>type</code> is specified, then the 
+     *   result will be returned as the corresponding type.For XPath 1.0 
+     *   results, this must be one of the codes of the 
+     *   <code>XPathResult</code> interface.
+     * @param result The <code>result</code> specifies a specific result 
+     *   object which may be reused and returned by this method. If this is 
+     *   specified as <code>null</code>or the implementation does not reuse 
+     *   the specified result, a new result object will be constructed and 
+     *   returned.For XPath 1.0 results, this object will be of type 
+     *   <code>XPathResult</code>.
+     * @return The result of the evaluation of the XPath expression.For XPath 
+     *   1.0 results, this object will be of type <code>XPathResult</code>.
+     * @exception XPathException
+     *   INVALID_EXPRESSION_ERR: Raised if the expression is not legal 
+     *   according to the rules of the <code>XPathEvaluator</code>i
+     *   <br>TYPE_ERR: Raised if the result cannot be converted to return the 
+     *   specified type.
+     * @exception DOMException
+     *   NAMESPACE_ERR: Raised if the expression contains namespace prefixes 
+     *   which cannot be resolved by the specified 
+     *   <code>XPathNSResolver</code>.
+     *   <br>WRONG_DOCUMENT_ERR: The Node is from a document that is not 
+     *   supported by this <code>XPathEvaluator</code>.
+     *   <br>NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath 
+     *   context node or the request type is not permitted by this 
+     *   <code>XPathEvaluator</code>.
+     */
+    public Object evaluate(String expression, 
+                           Node contextNode, 
+                           XPathNSResolver resolver, 
+                           short type, 
+                           Object result)
+                           throws XPathException, DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+/**
+ * A new exception has been created for exceptions specific to these XPath 
+ * interfaces.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public class XPathException extends RuntimeException {
+    public XPathException(short code, String message) {
+       super(message);
+       this.code = code;
+    }
+    public short   code;
+    // XPathExceptionCode
+    /**
+     * If the expression has a syntax error or otherwise is not a legal 
+     * expression according to the rules of the specific 
+     * <code>XPathEvaluator</code> or contains specialized extension 
+     * functions or variables not supported by this implementation.
+     */
+    public static final short INVALID_EXPRESSION_ERR    = 51;
+    /**
+     * If the expression cannot be converted to return the specified type.
+     */
+    public static final short TYPE_ERR                  = 52;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ * The <code>XPathExpression</code> interface represents a parsed and resolved 
+ * XPath expression.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public interface XPathExpression {
+    /**
+     * Evaluates this XPath expression and returns a result.
+     * @param contextNode The <code>context</code> is context node for the 
+     *   evaluation of this XPath expression.If the XPathEvaluator was 
+     *   obtained by casting the <code>Document</code> then this must be 
+     *   owned by the same document and must be a <code>Document</code>, 
+     *   <code>Element</code>, <code>Attribute</code>, <code>Text</code>, 
+     *   <code>CDATASection</code>, <code>Comment</code>, 
+     *   <code>ProcessingInstruction</code>, or <code>XPathNamespace</code> 
+     *   node.If the context node is a <code>Text</code> or a 
+     *   <code>CDATASection</code>, then the context is interpreted as the 
+     *   whole logical text node as seen by XPath, unless the node is empty 
+     *   in which case it may not serve as the XPath context.
+     * @param type If a specific <code>type</code> is specified, then the 
+     *   result will be coerced to return the specified type relying on 
+     *   XPath conversions and fail if the desired coercion is not possible. 
+     *   This must be one of the type codes of <code>XPathResult</code>.
+     * @param result The <code>result</code> specifies a specific result 
+     *   object which may be reused and returned by this method. If this is 
+     *   specified as <code>null</code>or the implementation does not reuse 
+     *   the specified result, a new result object will be constructed and 
+     *   returned.For XPath 1.0 results, this object will be of type 
+     *   <code>XPathResult</code>.
+     * @return The result of the evaluation of the XPath expression.For XPath 
+     *   1.0 results, this object will be of type <code>XPathResult</code>.
+     * @exception XPathException
+     *   TYPE_ERR: Raised if the result cannot be converted to return the 
+     *   specified type.
+     * @exception DOMException
+     *   WRONG_DOCUMENT_ERR: The Node is from a document that is not supported 
+     *   by the XPathEvaluator that created this <code>XPathExpression</code>
+     *   .
+     *   <br>NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath 
+     *   context node or the request type is not permitted by this 
+     *   <code>XPathExpression</code>.
+     */
+    public Object evaluate(Node contextNode, 
+                           short type, 
+                           Object result)
+                           throws XPathException, DOMException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+/**
+ * The <code>XPathNSResolver</code> interface permit <code>prefix</code> 
+ * strings in the expression to be properly bound to 
+ * <code>namespaceURI</code> strings. <code>XPathEvaluator</code> can 
+ * construct an implementation of <code>XPathNSResolver</code> from a node, 
+ * or the interface may be implemented by any application.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public interface XPathNSResolver {
+    /**
+     * Look up the namespace URI associated to the given namespace prefix. The 
+     * XPath evaluator must never call this with a <code>null</code> or 
+     * empty argument, because the result of doing this is undefined.
+     * @param prefix The prefix to look for.
+     * @return Returns the associated namespace URI or <code>null</code> if 
+     *   none is found.
+     */
+    public String lookupNamespaceURI(String prefix);
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * The <code>XPathNamespace</code> interface is returned by 
+ * <code>XPathResult</code> interfaces to represent the XPath namespace node 
+ * type that DOM lacks. There is no public constructor for this node type. 
+ * Attempts to place it into a hierarchy or a NamedNodeMap result in a 
+ * <code>DOMException</code> with the code <code>HIERARCHY_REQUEST_ERR</code>
+ * . This node is read only, so methods or setting of attributes that would 
+ * mutate the node result in a DOMException with the code 
+ * <code>NO_MODIFICATION_ALLOWED_ERR</code>.
+ * <p>The core specification describes attributes of the <code>Node</code> 
+ * interface that are different for different node types but does not 
+ * describe <code>XPATH_NAMESPACE_NODE</code>, so here is a description of 
+ * those attributes for this node type. All attributes of <code>Node</code> 
+ * not described in this section have a <code>null</code> or 
+ * <code>false</code> value.
+ * <p><code>ownerDocument</code> matches the <code>ownerDocument</code> of the 
+ * <code>ownerElement</code> even if the element is later adopted.
+ * <p><code>nodeName</code> is always the string "<code>#namespace</code>".
+ * <p><code>prefix</code> is the prefix of the namespace represented by the 
+ * node.
+ * <p><code>localName</code> is the same as <code>prefix</code>.
+ * <p><code>nodeType</code> is equal to <code>XPATH_NAMESPACE_NODE</code>.
+ * <p><code>namespaceURI</code> is the namespace URI of the namespace 
+ * represented by the node.
+ * <p><code>nodeValue</code> is the same as <code>namespaceURI</code>.
+ * <p><code>adoptNode</code>, <code>cloneNode</code>, and 
+ * <code>importNode</code> fail on this node type by raising a 
+ * <code>DOMException</code> with the code <code>NOT_SUPPORTED_ERR</code>.
+ * <p ><b>Note:</b> In future versions of the XPath specification, the 
+ * definition of a namespace node may be changed incomatibly, in which case 
+ * incompatible changes to field values may be required to implement 
+ * versions beyond XPath 1.0.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public interface XPathNamespace extends Node {
+    // XPathNodeType
+    /**
+     * The node is a <code>Namespace</code>.
+     */
+    public static final short XPATH_NAMESPACE_NODE      = 13;
+
+    /**
+     * The <code>Element</code> on which the namespace was in scope when it 
+     * was requested. This does not change on a returned namespace node even 
+     * if the document changes such that the namespace goes out of scope on 
+     * that element and this node is no longer found there by XPath.
+     */
+    public Element getOwnerElement();
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+package org.w3c.dom.xpath;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
+
+/**
+ * The <code>XPathResult</code> interface represents the result of the 
+ * evaluation of an XPath 1.0 expression within the context of a particular 
+ * node. Since evaluation of an XPath expression can result in various 
+ * result types, this object makes it possible to discover and manipulate 
+ * the type and value of the result.
+ * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ */
+public interface XPathResult {
+    // XPathResultType
+    /**
+     * This code does not represent a specific type. An evaluation of an XPath 
+     * expression will never produce this type. If this type is requested, 
+     * then the evaluation returns whatever type naturally results from 
+     * evaluation of the expression. 
+     * <br>If the natural result is a node set when <code>ANY_TYPE</code> was 
+     * requested, then <code>UNORDERED_NODE_ITERATOR_TYPE</code> is always 
+     * the resulting type. Any other representation of a node set must be 
+     * explicitly requested.
+     */
+    public static final short ANY_TYPE                  = 0;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#numbers'>number</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>]. 
+     * Document modification does not invalidate the number, but may mean 
+     * that reevaluation would not yield the same number.
+     */
+    public static final short NUMBER_TYPE               = 1;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#strings'>string</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>]. 
+     * Document modification does not invalidate the string, but may mean 
+     * that the string no longer corresponds to the current document.
+     */
+    public static final short STRING_TYPE               = 2;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#booleans'>boolean</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>]. 
+     * Document modification does not invalidate the boolean, but may mean 
+     * that reevaluation would not yield the same boolean.
+     */
+    public static final short BOOLEAN_TYPE              = 3;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#node-sets'>node set</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] that 
+     * will be accessed iteratively, which may not produce nodes in a 
+     * particular order. Document modification invalidates the iteration.
+     * <br>This is the default type returned if the result is a node set and 
+     * <code>ANY_TYPE</code> is requested.
+     */
+    public static final short UNORDERED_NODE_ITERATOR_TYPE = 4;
+    /**
+     * The result is a node set as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] that 
+     * will be accessed iteratively, which will produce document-ordered 
+     * nodes. Document modification invalidates the iteration.
+     */
+    public static final short ORDERED_NODE_ITERATOR_TYPE = 5;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#node-sets'>node set</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] that 
+     * will be accessed as a snapshot list of nodes that may not be in a 
+     * particular order. Document modification does not invalidate the 
+     * snapshot but may mean that reevaluation would not yield the same 
+     * snapshot and nodes in the snapshot may have been altered, moved, or 
+     * removed from the document.
+     */
+    public static final short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#node-sets'>node set</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] that 
+     * will be accessed as a snapshot list of nodes that will be in original 
+     * document order. Document modification does not invalidate the 
+     * snapshot but may mean that reevaluation would not yield the same 
+     * snapshot and nodes in the snapshot may have been altered, moved, or 
+     * removed from the document.
+     */
+    public static final short ORDERED_NODE_SNAPSHOT_TYPE = 7;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#node-sets'>node set</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] and 
+     * will be accessed as a single node, which may be <code>null</code>if 
+     * the node set is empty. Document modification does not invalidate the 
+     * node, but may mean that the result node no longer corresponds to the 
+     * current document. This is a convenience that permits optimization 
+     * since the implementation can stop once any node in the resulting set 
+     * has been found.
+     * <br>If there is more than one node in the actual result, the single 
+     * node returned might not be the first in document order.
+     */
+    public static final short ANY_UNORDERED_NODE_TYPE   = 8;
+    /**
+     * The result is a <a href='http://www.w3.org/TR/1999/REC-xpath-19991116#node-sets'>node set</a> as defined by [<a href='http://www.w3.org/TR/1999/REC-xpath-19991116'>XPath 1.0</a>] and 
+     * will be accessed as a single node, which may be <code>null</code> if 
+     * the node set is empty. Document modification does not invalidate the 
+     * node, but may mean that the result node no longer corresponds to the 
+     * current document. This is a convenience that permits optimization 
+     * since the implementation can stop once the first node in document 
+     * order of the resulting set has been found.
+     * <br>If there are more than one node in the actual result, the single 
+     * node returned will be the first in document order.
+     */
+    public static final short FIRST_ORDERED_NODE_TYPE   = 9;
+
+    /**
+     * A code representing the type of this result, as defined by the type 
+     * constants.
+     */
+    public short getResultType();
+
+    /**
+     * The value of this number result. If the native double type of the DOM 
+     * binding does not directly support the exact IEEE 754 result of the 
+     * XPath expression, then it is up to the definition of the binding to 
+     * specify how the XPath number is converted to the native binding 
+     * number.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>NUMBER_TYPE</code>.
+     */
+    public double getNumberValue()
+                             throws XPathException;
+
+    /**
+     * The value of this string result.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>STRING_TYPE</code>.
+     */
+    public String getStringValue()
+                             throws XPathException;
+
+    /**
+     * The value of this boolean result.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>BOOLEAN_TYPE</code>.
+     */
+    public boolean getBooleanValue()
+                             throws XPathException;
+
+    /**
+     * The value of this single node result, which may be <code>null</code>.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>ANY_UNORDERED_NODE_TYPE</code> or 
+     *   <code>FIRST_ORDERED_NODE_TYPE</code>.
+     */
+    public Node getSingleNodeValue()
+                             throws XPathException;
+
+    /**
+     * Signifies that the iterator has become invalid. True if 
+     * <code>resultType</code> is <code>UNORDERED_NODE_ITERATOR_TYPE</code> 
+     * or <code>ORDERED_NODE_ITERATOR_TYPE</code> and the document has been 
+     * modified since this result was returned.
+     */
+    public boolean getInvalidIteratorState();
+
+    /**
+     * The number of nodes in the result snapshot. Valid values for 
+     * snapshotItem indices are <code>0</code> to 
+     * <code>snapshotLength-1</code> inclusive.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>UNORDERED_NODE_SNAPSHOT_TYPE</code> or 
+     *   <code>ORDERED_NODE_SNAPSHOT_TYPE</code>.
+     */
+    public int getSnapshotLength()
+                             throws XPathException;
+
+    /**
+     * Iterates and returns the next node from the node set or 
+     * <code>null</code>if there are no more nodes.
+     * @return Returns the next node.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>UNORDERED_NODE_ITERATOR_TYPE</code> or 
+     *   <code>ORDERED_NODE_ITERATOR_TYPE</code>.
+     * @exception DOMException
+     *   INVALID_STATE_ERR: The document has been mutated since the result was 
+     *   returned.
+     */
+    public Node iterateNext()
+                            throws XPathException, DOMException;
+
+    /**
+     * Returns the <code>index</code>th item in the snapshot collection. If 
+     * <code>index</code> is greater than or equal to the number of nodes in 
+     * the list, this method returns <code>null</code>. Unlike the iterator 
+     * result, the snapshot does not become invalid, but may not correspond 
+     * to the current document if it is mutated.
+     * @param index Index into the snapshot collection.
+     * @return 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.
+     * @exception XPathException
+     *   TYPE_ERR: raised if <code>resultType</code> is not 
+     *   <code>UNORDERED_NODE_SNAPSHOT_TYPE</code> or 
+     *   <code>ORDERED_NODE_SNAPSHOT_TYPE</code>.
+     */
+    public Node snapshotItem(int index)
+                             throws XPathException;
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/Asynchron.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/Asynchron.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/Asynchron.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/Asynchron.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,185 @@
+/* Asynchron.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.Request;
+import org.omg.CORBA.WrongTransaction;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+
+/**
+ * Handles the asynchronous dynamic invocations.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class Asynchron
+{
+  LinkedList sent = new LinkedList();
+
+  /**
+   * Send multiple prepared requests one way, do not caring about the answer.
+   * The messages, containing requests, will be marked, indicating that
+   * the sender is not expecting to get a reply.
+   *
+   * @param requests the prepared array of requests.
+   *
+   * @see Request#send_oneway()
+   */
+  public void send_multiple_requests_oneway(Request[] requests)
+  {
+    for (int i = 0; i < requests.length; i++)
+      {
+        requests [ i ].send_oneway();
+      }
+  }
+
+  /**
+   * Send multiple prepared requests expecting to get a reply. All requests
+   * are send in parallel, each in its own separate thread. When the
+   * reply arrives, it is stored in the agreed fields of the corresponing
+   * request data structure. If this method is called repeatedly,
+   * the new requests are added to the set of the currently sent requests,
+   * but the old set is not discarded.
+   *
+   * @param requests the prepared array of requests.
+   *
+   * @see #poll_next_response()
+   * @see #get_next_response()
+   * @see Request#send_deferred()
+   */
+  public void send_multiple_requests_deferred(Request[] requests)
+  {
+    synchronized (sent)
+      {
+        for (int i = 0; i < requests.length; i++)
+          {
+            sent.add(requests [ i ]);
+
+            // TODO Reuse threads that are instantiated in the method below,
+            // one thread per call.
+            requests [ i ].send_deferred();
+          }
+      }
+  }
+
+  /**
+   * Find if any of the requests that have been previously sent with
+   * {@link #send_multiple_requests_deferred}, have a response yet.
+   *
+   * @return true if there is at least one response to the previously
+   * sent request, false otherwise.
+   */
+  public boolean poll_next_response()
+  {
+    synchronized (sent)
+      {
+        Iterator iter = sent.iterator();
+        Request r;
+        while (iter.hasNext())
+          {
+            r = (Request) iter.next();
+            if (r.poll_response())
+              return true;
+          }
+      }
+    return false;
+  }
+
+  /**
+   * Get the next instance with a response being received. If all currently
+   * sent responses not yet processed, this method pauses till at least one of
+   * them is complete. If there are no requests currently sent, the method
+   * pauses till some request is submitted and the response is received.
+   * This strategy is identical to the one accepted by Suns 1.4 ORB
+   * implementation.
+   *
+   * The returned response is removed from the list of the currently
+   * submitted responses and is never returned again.
+   *
+   * @return the previously sent request that now contains the received
+   * response.
+   *
+   * @throws WrongTransaction If the method was called from the transaction
+   * scope different than the one, used to send the request. The exception
+   * can be raised only if the request is implicitly associated with some
+   * particular transaction.
+   */
+  public Request get_next_response()
+                            throws WrongTransaction
+  {
+    // The hard-coded waiting times for the incremental waiter.
+    // TODO it is possible to write more tricky system where the
+    // requests notify the Asynchron when they are complete.
+    // Wait for 5 ms intially.
+    int wait = 8;
+
+    // Double the waiting time
+    int INC = 2;
+
+    // Do not increase if the waiting time is already over 500 ms.
+    int MAX = 500;
+    while (true)
+      {
+        synchronized (sent)
+          {
+            Iterator iter = sent.iterator();
+            Request r;
+            while (iter.hasNext())
+              {
+                r = (Request) iter.next();
+                if (r.poll_response())
+                {
+                  sent.remove(r);
+                  return r;
+                }
+              }
+          }
+        try
+          {
+            Thread.sleep(wait);
+            if (wait < MAX)
+              wait = wait * INC;
+          }
+        catch (InterruptedException ex)
+          {
+          }
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/BigDecimalHelper.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/BigDecimalHelper.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/BigDecimalHelper.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/BigDecimalHelper.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,193 @@
+/* BigDecimalHelper.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+
+/**
+ * Reads and writes BigDecimal as CORBA <code>fixed</code>.
+ * The format, described in CORBA specification, requires to store
+ * data in hexadecimal format, two digits per byte (oceted), most
+ * significant digit first. The last half-byte in the representation
+ * stores the sign, being 0xD for negative numbers and 0xC for
+ * zero and positive numbers. To have the even number of half bytes,
+ * 0x0 is appended to the beginning, if required. The position of the
+ * decimal point is not stored.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class BigDecimalHelper
+{
+  {
+  }
+
+  /**
+   * @todo remove from the release version.
+   */
+  public static void main(String[] args)
+  {
+    try
+      {
+        ByteArrayOutputStream b = new ByteArrayOutputStream();
+        BigDecimal d = new BigDecimal("12234.54689");
+
+        write(b, d);
+
+        byte[] a = b.toByteArray();
+
+        for (int i = 0; i < a.length; i++)
+          {
+            int k = a [ i ] & 0xFF;
+            System.out.print(Integer.toHexString(k) + " ");
+          }
+
+        System.out.println("Now reading");
+
+        ByteArrayInputStream bin = new ByteArrayInputStream(a);
+
+        BigDecimal r = read(bin, d.scale());
+
+        System.out.println(r);
+      }
+    catch (Exception ex)
+      {
+        ex.printStackTrace();
+      }
+  }
+
+  /**
+   * Read the CORBA fixed, autodetecting the number of bytes
+   * and assuming the given scale.
+   */
+  public static BigDecimal read(java.io.InputStream in, int scale)
+                         throws IOException
+  {
+    ByteArrayOutputStream bout = new ByteArrayOutputStream();
+
+    int f;
+
+    do
+      {
+        f = in.read();
+        if (f >= 0)
+          bout.write(f);
+      }
+    // The last byte has 0xC or 0xD in the last halfbyte.  
+    while ((f & 0xF) <= 0x9);
+
+    return createFixed(scale, bout.toByteArray());
+  }
+
+  /**
+   * Write the big decimal as CORBA <code>fixed<.code>.
+   * The scale will not be stored.
+   * 
+   * @param out a stream to write into.
+   * @param x a big decimal to write.
+   * @param digits a number of the decimal digits in the record
+   * being written. For the smaller
+   * numbers, zeroes are added to the left.
+   *
+   * @throws IOException if the stream write method throws one.
+   * @throws BadKind if this BigDecimal has more digits than
+   * specified.
+   */
+  public static void write(java.io.OutputStream out, BigDecimal x)
+                    throws IOException, BadKind
+  {
+    StringBuffer v = new StringBuffer(x.unscaledValue().toString());
+
+    boolean negative = v.charAt(0) == '-';
+
+    if (negative)
+      v = v.deleteCharAt(0);
+
+    if ( (v.length() & 1) == 0)
+      v.insert(0, '0');
+
+    int c;
+
+    for (int i = 0; i < v.length() - 1; i = i + 2)
+      {
+        c = ((v.charAt(i) - '0') << 4) | (v.charAt(i + 1) - '0');
+        out.write(c);
+      }
+
+    c = ((v.charAt(v.length() - 1) - '0') << 4) | (negative ? 0xD : 0xC);
+
+    out.write(c);
+  }
+
+  /**
+   * Convert the loaded byte array, representing
+   * CORBA <code>fixed</code>, into an instance of
+   * the {@link BigDecimal}
+   */
+  private static BigDecimal createFixed(int scale, byte[] d)
+  {
+    StringBuffer s = new StringBuffer(2 * d.length);
+
+    int last = d.length - 1;
+
+    if ((d [ last ] & 0xF) == 0xD)
+      s.append('-');
+
+    if (last > 0)
+      for (int i = 0; i < last; i++)
+        {
+          s.append((char) (((d [ i ] >> 4) & 0xF) + '0'));
+          s.append((char) (((d [ i ]) & 0xF) + '0'));
+        }
+
+    s.append((char) (((d [ last ] >> 4) & 0xF) + '0'));
+
+    BigInteger b = new BigInteger(s.toString());
+    BigDecimal dec = new BigDecimal(b, scale);
+
+    return dec;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/ByteArrayComparator.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/ByteArrayComparator.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/ByteArrayComparator.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/ByteArrayComparator.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,91 @@
+/* ByteArrayComparator.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+/**
+ * A byte array comparator for mapping with CORBA object keys.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class ByteArrayComparator
+  implements Comparator
+{
+  /**
+   * Compare arrays first by absolute equality, then by length
+   * and then (byte to byte) by content.
+   *
+   * @return 0 if arrays are equal, some comparison value otherwise.
+   */
+  public int compare(Object an_a, Object a_b)
+  {
+    if (an_a == a_b)
+      return 0;
+
+    byte[] a = null;
+    byte[] b = null;
+    try
+      {
+        a = (byte[]) an_a;
+        b = (byte[]) a_b;
+      }
+    catch (Exception ex)
+      {
+        throw new InternalError(an_a.getClass().getName() + "," +
+                                a_b.getClass().getName()
+                               );
+      }
+
+    if (a.length != b.length)
+      return a.length - b.length;
+    else
+      {
+        // The array sizes must be equal.
+        for (int i = 0; i < b.length; i++)
+          {
+            if (a [ i ] != b [ i ])
+              return a [ i ] - b [ i ];
+          }
+      }
+
+    return 0;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1768 @@
+/* AbstractCdrInput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.BigDecimalHelper;
+import gnu.CORBA.OrbFunctional;
+import gnu.CORBA.GIOP.CharSets_OSF;
+import gnu.CORBA.GIOP.CodeSetServiceContext;
+import gnu.CORBA.IOR;
+import gnu.CORBA.IorDelegate;
+import gnu.CORBA.Minor;
+import gnu.CORBA.TypeCodeHelper;
+import gnu.CORBA.Unexpected;
+import gnu.CORBA.Version;
+import gnu.CORBA.gnuAny;
+import gnu.CORBA.StubLocator;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.AnySeqHolder;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BooleanSeqHolder;
+import org.omg.CORBA.CharSeqHolder;
+import org.omg.CORBA.DoubleSeqHolder;
+import org.omg.CORBA.FloatSeqHolder;
+import org.omg.CORBA.LongLongSeqHolder;
+import org.omg.CORBA.LongSeqHolder;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.OctetSeqHolder;
+import org.omg.CORBA.ShortSeqHolder;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.TypeCodePackage.Bounds;
+import org.omg.CORBA.ULongLongSeqHolder;
+import org.omg.CORBA.ULongSeqHolder;
+import org.omg.CORBA.UShortSeqHolder;
+import org.omg.CORBA.WCharSeqHolder;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Serializable;
+
+import java.math.BigDecimal;
+
+/**
+ * A simple CORBA CDR (common data representation) input stream, reading data
+ * from the given {@link java.io.InputStream}. The primitive types are aligned
+ * on they natural boundaries by implementing the abstract method
+ * {@link #align(int boundary)}.
+ * 
+ * The same class also implements {@link org.omg.CORBA.DataInputStream} to read
+ * the object content in a user defined way.
+ * 
+ * TODO This class uses 16 bits per Unicode character only, as it was until jdk
+ * 1.4 inclusive.
+ * 
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public abstract class AbstractCdrInput
+  extends org.omg.CORBA_2_3.portable.InputStream
+  implements org.omg.CORBA.DataInputStream
+{
+  /**
+   * The runtime, associated with this stream. This field is only used when
+   * reading and writing value types and filled-in in gnu.CORBA.CDR.Vio.
+   */
+  public transient gnuRuntime runtime;
+
+  /**
+   * The message, explaining that the exception has been thrown due unexpected
+   * end of the input stream. This usually happens the server and client
+   * disagree on communication or data representation rules.
+   */
+  protected static final String UNEXP_EOF = "Unexpected end of stream";
+
+  /**
+   * This instance is used to convert primitive data types into the byte
+   * sequences.
+   */
+  protected AbstractDataInput b;
+
+  /**
+   * The input stream, from where the data are actually being read.
+   */
+  protected java.io.InputStream actual_stream;
+
+  /**
+   * The associated orb, if any.
+   */
+  protected ORB orb;
+
+  /**
+   * The GIOP version.
+   */
+  protected Version giop = new Version(1, 2);
+
+  /**
+   * The code set information.
+   */
+  protected CodeSetServiceContext codeset = CodeSetServiceContext.STANDARD;
+
+  /**
+   * The name of the currently used narrow charset, null if the native narrow
+   * charset is used.
+   */
+  private String narrow_charset = null;
+
+  /**
+   * The name of the currently used wide charset, null if the native wide
+   * charset is used.
+   */
+  private String wide_charset = null;
+
+  /**
+   * True if the native code set is used for narrow characters. If the set is
+   * native, no the intermediate Reader object is instantiated when writing
+   * characters.
+   */
+  private boolean narrow_native;
+
+  /**
+   * True if the native code set is used for wide characters. If the set is
+   * native, no the intermediate Reader object is instantiated when writing
+   * characters.
+   */
+  private boolean wide_native;
+
+  /**
+   * If true, the stream expect the multi-byte data in the form "less
+   * significant byte first" (Little Endian). This is the opposite to the java
+   * standard (Big Endian).
+   */
+  private boolean little_endian;
+
+  /**
+   * Creates the stream. The stream reads Big Endian by default.
+   * 
+   * @param readFrom a stream to read CORBA input from.
+   */
+  public AbstractCdrInput(java.io.InputStream readFrom)
+  {
+    setInputStream(readFrom);
+    setCodeSet(CodeSetServiceContext.STANDARD);
+  }
+
+  /**
+   * Creates the stream, requiring the subsequent call of
+   * {@link #setInputStream(java.io.InputStream)}.
+   */
+  public AbstractCdrInput()
+  {
+    setCodeSet(CodeSetServiceContext.STANDARD);
+  }
+
+  /**
+   * Set the Big Endian or Little Endian encoding. The stream reads Big Endian
+   * by default.
+   * 
+   * @param use_little_endian if true, the stream expect the multi-byte data in
+   * the form "less significant byte first" (Little Endian). This is the
+   * opposite to the java standard (Big Endian).
+   */
+  public void setBigEndian(boolean use_big_endian)
+  {
+    little_endian = !use_big_endian;
+    setInputStream(actual_stream);
+  }
+
+  /**
+   * Get the used encoding.
+   * 
+   * @param true for Big Endian, false for Little Endian.
+   */
+  public boolean isBigEndian()
+  {
+    return !little_endian;
+  }
+
+  /**
+   * Clone all important settings to another stream.
+   */
+  public void cloneSettings(AbstractCdrInput stream)
+  {
+    stream.setBigEndian(isBigEndian());
+    stream.setCodeSet(getCodeSet());
+    stream.setVersion(giop);
+    stream.setOrb(orb);
+  }
+
+  /**
+   * Set the input stream that receives the CORBA input.
+   * 
+   * @param readFrom the stream.
+   */
+  public void setInputStream(java.io.InputStream readFrom)
+  {
+    if (little_endian)
+      b = new LittleEndianInputStream(readFrom);
+    else
+      b = new BigEndianInputStream(readFrom);
+
+    actual_stream = readFrom;
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the stream is
+   * different from 0.
+   */
+  public abstract void setOffset(int offset);
+
+  /**
+   * Set the orb, associated with this stream.
+   * 
+   * @param an_orb
+   */
+  public void setOrb(ORB an_orb)
+  {
+    orb = an_orb;
+  }
+
+  /**
+   * Set the GIOP version. Some data types are written differently for the
+   * different versions. The default version is 1.0 .
+   */
+  public void setVersion(Version giop_version)
+  {
+    giop = giop_version;
+  }
+
+  /**
+   * Align the curretn position at the given natural boundary.
+   */
+  public abstract void align(int boundary);
+
+  /**
+   * Reads the CORBA unsigned long (java int), returning the value in the
+   * sufficiently large java long.
+   */
+  public long gnu_read_ulong()
+  {
+    try
+      {
+        long l = b.readInt();
+        l &= 0xFFFFFFF;
+        return l;
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the unsigned short integer value and return it as java int,
+   * sufficiently large to hold all values.
+   */
+  public int gnu_read_ushort()
+  {
+    try
+      {
+        align(2);
+        return b.readUnsignedShort();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Return the associated {@link ORB}.
+   * 
+   * @return the associated {@link ORB} or null is no such is set.
+   */
+  public ORB orb()
+  {
+    return orb;
+  }
+
+  /**
+   * Read a single byte directly from the buffer.
+   */
+  public int read()
+    throws java.io.IOException
+  {
+    try
+      {
+        return b.read();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+  /**
+   * Read bytes directly from the buffer.
+   */
+  public int read(byte[] x, int ofs, int len)
+    throws java.io.IOException
+  {
+    try
+      {
+        return b.read(x, ofs, len);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+  /**
+   * Read bytes directly from the buffer.
+   */
+  public int read(byte[] x)
+    throws java.io.IOException
+  {
+    try
+      {
+        return b.read(x);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+  /**
+   * Read the CORBA object. The object to read is represented in the form of the
+   * plain (not a string-encoded) IOR profile without the heading endian
+   * indicator. The responsible method for reading such data is
+   * {@link IOR.read_no_endian}.
+   * 
+   * The returned object is usually casted into the given type using the .narrow
+   * method of its helper, despite in some cases the direct cast would also
+   * work.
+   * 
+   * The null objects are recognised from the empty profile set. For such
+   * objects, null is returned.
+   * 
+   * @return the loaded and constructed object.
+   */
+  public org.omg.CORBA.Object read_Object()
+  {
+    try
+      {
+        IOR ior = new IOR();
+        ior._read_no_endian(this);
+
+        if (ior.Id == null)
+          return null;
+
+        // Check maybe this is a remote reference to the local object.
+        // This is only possible if we access the repository of the
+        // connected object.
+        if (orb instanceof OrbFunctional)
+          {
+            OrbFunctional forb = (OrbFunctional) orb;
+            org.omg.CORBA.Object local = forb.find_local_object(ior);
+            if (local != null)
+              return local;
+          }
+
+        // Search for the available stubs.
+        ObjectImpl impl = StubLocator.search(orb, ior);
+        try
+          {
+            if (impl._get_delegate() == null)
+              impl._set_delegate(new IorDelegate(orb, ior));
+          }
+        catch (BAD_OPERATION ex)
+          {
+            // Some colaborants may throw this exception
+            // in response to the attempt to get the unset delegate.
+            impl._set_delegate(new IorDelegate(orb, ior));
+          }
+
+        return impl;
+      }
+    catch (IOException ex)
+      {
+        MARSHAL bad = new MARSHAL();
+        bad.minor = Minor.IOR;
+        bad.initCause(ex);
+        throw bad;
+      }
+  }
+
+  /**
+   * Read the type code. The type code format is defined in the CORBA
+   * documenation.
+   */
+  public TypeCode read_TypeCode()
+  {
+    try
+      {
+        return TypeCodeHelper.read(this);
+      }
+
+    catch (Bounds ex)
+      {
+        throw new Unexpected();
+      }
+    catch (BadKind ex)
+      {
+        throw new Unexpected();
+      }
+  }
+
+  /**
+   * Read the CORBA {@link Any}. This method first reads the type code, then
+   * delegates the functionality to {@link Any#read_value}.
+   */
+  public Any read_any()
+  {
+    TypeCode ty = read_TypeCode();
+    gnuAny any = new gnuAny();
+    any.read_value(this, ty);
+    return any;
+  }
+
+  /**
+   * Read the boolean, treating any non zero byte as true, zero byte as false.
+   */
+  public boolean read_boolean()
+  {
+    try
+      {
+        return b.read() == 0 ? false : true;
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the array of boolean.
+   */
+  public void read_boolean_array(boolean[] x, int offs, int len)
+  {
+    try
+      {
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.read() == 0 ? false : true;
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read a character using narrow charset encoding. Depending form which
+   * encoding is set, this still can be Unicode or ever wider.
+   */
+  public char read_char()
+  {
+    try
+      {
+        if (narrow_native)
+          return (char) b.read();
+        else
+          return (char) new InputStreamReader((InputStream) b, narrow_charset).read();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read a character array, using narrow charset encoding.
+   */
+  public void read_char_array(char[] x, int offset, int length)
+  {
+    try
+      {
+        if (narrow_native)
+          {
+            for (int i = offset; i < offset + length; i++)
+              x[i] = (char) b.read();
+          }
+        else
+          {
+            InputStreamReader reader = new InputStreamReader((InputStream) b,
+              narrow_charset);
+            reader.read(x, offset, length);
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the double value, IEEE 754 format.
+   */
+  public double read_double()
+  {
+    try
+      {
+        align(8);
+        return b.readDouble();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected();
+      }
+  }
+
+  /**
+   * Read the array of double values, IEEE 754 format.
+   */
+  public void read_double_array(double[] x, int offs, int len)
+  {
+    try
+      {
+        align(8);
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.readDouble();
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the encapsulated stream. If the encapsulated sequence appears to be in
+   * the Little endian format, the flag of the returned stream is set to read
+   * Little endian.
+   */
+  public BufferredCdrInput read_encapsulation()
+  {
+    try
+      {
+        int l = read_long();
+
+        byte[] r = new byte[l];
+        int n = 0;
+        reading: while (n < r.length)
+          {
+            n += read(r, n, r.length - n);
+          }
+
+        BufferredCdrInput capsule = new BufferredCdrInput(r);
+        capsule.setOrb(orb);
+
+        int endian = capsule.read_octet();
+
+        if (endian != 0)
+          {
+            capsule.setBigEndian(false);
+          }
+
+        return capsule;
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the CORBA fixed (the end of the <code>fixed</code> can be determined
+   * by its last byte). The scale is always assumed to be zero.
+   */
+  public BigDecimal read_fixed()
+  {
+    try
+      {
+        return BigDecimalHelper.read(this, 0);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the float value, IEEE 754 format.
+   */
+  public float read_float()
+  {
+    try
+      {
+        align(4);
+        return b.readFloat();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read an array of float values, IEEE 754 format.
+   */
+  public void read_float_array(float[] x, int offs, int len)
+  {
+    try
+      {
+        align(4);
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.readFloat();
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the CORBA long (java int), high byte first.
+   */
+  public int read_long()
+  {
+    try
+      {
+        align(4);
+        return b.readInt();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read an array of CORBA longs (java ints).
+   */
+  public void read_long_array(int[] x, int offs, int len)
+  {
+    try
+      {
+        align(4);
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.readInt();
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the CORBA long long (java long).
+   */
+  public long read_longlong()
+  {
+    try
+      {
+        align(8);
+        return b.readLong();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read an array of CORBA long longs (java longs).
+   */
+  public void read_longlong_array(long[] x, int offs, int len)
+  {
+    try
+      {
+        align(8);
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.readLong();
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read a single byte.
+   */
+  public byte read_octet()
+  {
+    try
+      {
+        return b.readByte();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the byte array.
+   */
+  public void read_octet_array(byte[] x, int offs, int len)
+  {
+    try
+      {
+        b.read(x, offs, len);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the length of the byte array as CORBA long and then the array itseld.
+   */
+  public byte[] read_sequence()
+  {
+    try
+      {
+        int l = read_long();
+        byte[] buf = new byte[l];
+        if (l > 0)
+          {
+            b.readFully(buf);
+          }
+        return buf;
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the CORBA short integer.
+   */
+  public short read_short()
+  {
+    try
+      {
+        align(2);
+        return b.readShort();
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read the array of CORBA short integer values.
+   */
+  public void read_short_array(short[] x, int offs, int len)
+  {
+    try
+      {
+        align(2);
+        for (int i = offs; i < offs + len; i++)
+          {
+            x[i] = b.readShort();
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Read a singe byte string. The method firs reads the byte array and then
+   * calls a constructor to create a string from this array. The character
+   * encoding, if previously set, is taken into consideration.
+   * 
+   * @return a loaded string.
+   */
+  public String read_string()
+  {
+    int n = 0;
+    try
+      {
+        align(4);
+
+        n = b.readInt();
+        byte[] s = new byte[n];
+        b.read(s);
+
+        // Discard the null terminator.
+        if (narrow_charset == null)
+          return new String(s, 0, n - 1);
+        else
+          return new String(s, 0, n - 1, narrow_charset);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+    catch (IOException ex)
+      {
+        throw new Unexpected();
+      }
+    catch (NegativeArraySizeException nex)
+      {
+        MARSHAL m = new MARSHAL("Input stream broken, got " + n + "(0x"
+          + Integer.toHexString(n) + ") as a string size");
+        m.minor = Minor.Negative;
+        throw m;
+      }
+  }
+
+  /**
+   * Reads the CORBA unsigned long (java int), delegating functionality to
+   * {@link #read_long}.
+   */
+  public int read_ulong()
+  {
+    return read_long();
+  }
+
+  /**
+   * Reads the array of CORBA unsigned long (java integer) values, delegating
+   * functionality to {@link #real_long_array}.
+   */
+  public void read_ulong_array(int[] x, int offs, int len)
+  {
+    read_long_array(x, offs, len);
+  }
+
+  /**
+   * Read the CORBA unsigned long long value, delegating functionality to
+   * {@link #read_longlong}. There is no way to return values over the limit of
+   * the java signed long in other way than returning the negative value.
+   */
+  public long read_ulonglong()
+  {
+    return read_longlong();
+  }
+
+  /**
+   * Reads the array of CORBA long long (java long) values, delegating
+   * functionality to {@link #real_longlong_array}.
+   */
+  public void read_ulonglong_array(long[] x, int offs, int len)
+  {
+    read_longlong_array(x, offs, len);
+  }
+
+  /**
+   * Read the unsigned short integer value. Due strange specification, the
+   * returned value must be the short type as well, so the the best solution
+   * seems just to delegete functionality to read_short.
+   */
+  public short read_ushort()
+  {
+    return read_short();
+  }
+
+  /**
+   * Read an array of unsigned short values, delegating the functionality to
+   * {@link read_short_array}.
+   */
+  public void read_ushort_array(short[] x, int offs, int len)
+  {
+    read_short_array(x, offs, len);
+  }
+
+  /**
+   * Reads the wide character using the encoding, specified in the wide_charset.
+   */
+  public char read_wchar()
+  {
+    try
+      {
+        if (giop.until_inclusive(1, 1))
+          {
+            align(2);
+
+            if (wide_native)
+              return (char) b.readShort();
+            else
+              return (char) new InputStreamReader((InputStream) b, wide_charset).read();
+          }
+        else
+          {
+            int l = b.read();
+            if (l == 2 && wide_native)
+              return b.readChar();
+            else if (l <= 0)
+              {
+                 MARSHAL m = new MARSHAL("wchar size " + l);
+                 m.minor = Minor.Negative;
+                 throw m;
+              }
+            else
+              {
+                byte[] bytes = new byte[l];
+                b.readFully(bytes);
+                String cs;
+
+                if (bytes.length > 2 && bytes[0] == 0xFE && bytes[1] == 0xFF)
+                  cs = new String(bytes, 2, bytes.length - 2, wide_charset);
+                else if (bytes.length > 2 && bytes[0] == 0xFF
+                  && bytes[1] == 0xFE)
+                  {
+                    // Litle endian detected - swap bytes.
+                    byte t;
+                    for (int i = 3; i < bytes.length; i = i + 2)
+                      {
+                        t = bytes[i];
+                        bytes[i - 1] = bytes[i];
+                        bytes[i] = t;
+                      }
+                    cs = new String(bytes, 2, bytes.length - 2, wide_charset);
+                  }
+                else
+                  cs = new String(bytes, wide_charset);
+
+                return cs.charAt(0);
+              }
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+    catch (IOException ex)
+      {
+        throw new Unexpected();
+      }
+  }
+
+  /**
+   * Read an array of "wide chars", each representing a two byte Unicode
+   * character, high byte first.
+   */
+  public void read_wchar_array(char[] x, int offset, int length)
+  {
+    try
+      {
+        if (giop.until_inclusive(1, 1))
+          align(2);
+
+        if (wide_native)
+          {
+            for (int i = offset; i < offset + length; i++)
+              x[i] = (char) b.readShort();
+          }
+        else
+          {
+            InputStreamReader reader = new InputStreamReader((InputStream) b,
+              wide_charset);
+            reader.read(x, offset, length);
+          }
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Reads the string in wide character format (ussually UTF-16, Unicode). Takes
+   * the currently set charset into consideration.
+   * 
+   * If the native (UTF-16) encoding is used of the GIOP protocol is before 1.2,
+   * delegates functionality to "plain" {@link #read_wstring_UTF_16}.
+   */
+  public String read_wstring()
+  {
+    // Native encoding or word oriented data.
+    if (wide_native || giop.until_inclusive(1, 1))
+      return read_wstring_UTF_16();
+    try
+      {
+        align(4);
+
+        int n = b.readInt();
+        byte[] s = new byte[n];
+        b.read(s);
+
+        return new String(s, 0, n, wide_charset);
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Reads first length of the string and the all characters as an Unicode
+   * (UTF-16) characters. Mind that GIOP 1.1 has the extra null character at the
+   * end that must be discarded.
+   */
+  public String read_wstring_UTF_16()
+  {
+    try
+      {
+        int p = 0;
+        int n = read_long();
+        
+        if (n<0)
+          {
+            MARSHAL m = new MARSHAL("Negative string size");
+            m.minor = Minor.Negative;
+            throw m;
+          }
+
+        // The null terminator that is no longer present since 1.2 .
+        int nt = giop.since_inclusive(1, 2) ? 0 : 1;
+
+        // Convert bytes to shorts.
+        n = n / 2;
+
+        // Empty string.
+        if (n == 0)
+          return "";
+
+        char[] s = new char[n];
+
+        for (int i = 0; i < s.length; i++)
+          s[i] = (char) b.readShort();
+
+        // Check for the byte order marker here.
+        if (s[0] == 0xFEFF)
+          {
+            // Big endian encoding - do nothing, but move the pointer
+            // one position forward.
+            p = 1;
+          }
+        else if (s[0] == 0xFFFE)
+          {
+            // Little endian encoding, swap the bytes and move one
+            // position forward.
+            p = 1;
+
+            for (int i = p; i < s.length; i++)
+              s[i] = swap(s[i]);
+          }
+
+        // Discard the null terminator and, if needed, the endian marker.
+        String r = new String(s, p, n - nt - p);
+        return r;
+      }
+    catch (EOFException ex)
+      {
+        MARSHAL t = new MARSHAL(UNEXP_EOF);
+        t.minor = Minor.EOF;
+        t.initCause(ex);
+        throw t;
+      }
+
+    catch (IOException ex)
+      {
+        throw new Unexpected(ex);
+      }
+  }
+
+  /**
+   * Swap bytes in the character.
+   */
+  public static char swap(char x)
+  {
+    int hi;
+    int lo;
+
+    lo = x & 0xFF;
+    hi = (x >> 8) & 0xFF;
+
+    return (char) ((lo << 8) | hi);
+  }
+
+  /**
+   * Set the current code set context.
+   */
+  public void setCodeSet(CodeSetServiceContext a_codeset)
+  {
+    this.codeset = a_codeset;
+    narrow_charset = CharSets_OSF.getName(codeset.char_data);
+    wide_charset = CharSets_OSF.getName(codeset.wide_char_data);
+
+    narrow_native = CharSets_OSF.NATIVE_CHARACTER == codeset.char_data;
+    wide_native = CharSets_OSF.NATIVE_WIDE_CHARACTER == codeset.wide_char_data;
+  }
+
+  /**
+   * Get the current code set context.
+   */
+  public CodeSetServiceContext getCodeSet()
+  {
+    return codeset;
+  }
+
+  /**
+   * Read the object that is an instance of the given class. The current
+   * implementation delegates functionality to the parameterless
+   * {@link readObject()}.
+   * 
+   * @param klass a class of that this object the instance is.
+   * 
+   * @return the returned object.
+   */
+  public org.omg.CORBA.Object read_Object(Class klass)
+  {
+    return read_Object();
+  }
+
+  /**
+   * Read a value type structure from the stream.
+   * 
+   * OMG specification states the writing format is outside the scope of GIOP
+   * definition. This implementation uses java serialization mechanism, calling
+   * {@link ObjectInputStream#readObject}
+   * 
+   * @return an value type structure, unmarshaled from the stream
+   */
+  public Serializable read_Value()
+  {
+    return read_value();
+  }
+
+  /**
+   * Read the abstract interface. An abstract interface can be either CORBA
+   * value type or CORBA object and is returned as an abstract java.lang.Object.
+   * 
+   * As specified in OMG specification, this reads a single boolean and then
+   * delegates either to {@link #read_Object()} (for false) or to
+   * {@link #read_Value()} (for true).
+   * 
+   * @return an abstract interface, unmarshaled from the stream
+   */
+  public java.lang.Object read_Abstract()
+  {
+    return read_abstract_interface();
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_char_array(CharSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_char_array(holder.value, offset, length);
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_wchar_array(WCharSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_wchar_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the char array to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing char array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private char[] ensureArray(char[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new char[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        char[] value = new char[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_ulong_array(ULongSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_ulong_array(holder.value, offset, length);
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_long_array(LongSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_ulong_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the int array to fit the newly read values.
+   * 
+   * @param holder_value the existing int array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private int[] ensureArray(int[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new int[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        int[] value = new int[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_float_array(FloatSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_float_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the float array to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing float array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private float[] ensureArray(float[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new float[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        float[] value = new float[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_double_array(DoubleSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_double_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the double array to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing double array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private double[] ensureArray(double[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new double[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        double[] value = new double[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_short_array(ShortSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_short_array(holder.value, offset, length);
+  }
+
+  /** {@inheritDoc} */
+  public void read_ushort_array(UShortSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_ushort_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the short array to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing short array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private short[] ensureArray(short[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new short[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        short[] value = new short[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_octet_array(OctetSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_octet_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the byte array to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing byte array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private byte[] ensureArray(byte[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new byte[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        byte[] value = new byte[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_longlong_array(LongLongSeqHolder holder, int offset,
+    int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_longlong_array(holder.value, offset, length);
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_ulonglong_array(ULongLongSeqHolder holder, int offset,
+    int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_ulonglong_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the array of longs to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing array, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private long[] ensureArray(long[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new long[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        long[] value = new long[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_boolean_array(BooleanSeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    read_boolean_array(holder.value, offset, length);
+  }
+
+  /**
+   * If required, allocate or resize the array of booleans to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing array of booleans, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private boolean[] ensureArray(boolean[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new boolean[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        boolean[] value = new boolean[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * Read an array. In OMG specification is written that if the data does not
+   * fit into the holder value field, that array must be resized. The
+   * implementation follows this rule. If the holder value field contains null,
+   * it is newly instantiated.
+   */
+  public void read_any_array(AnySeqHolder holder, int offset, int length)
+  {
+    holder.value = ensureArray(holder.value, offset, length);
+    for (int i = offset; i < offset + length; i++)
+      {
+        holder.value[i] = read_any();
+      }
+  }
+
+  /**
+   * If required, allocate or resize the array of Anys to fit the newly read
+   * values.
+   * 
+   * @param holder_value the existing array of Anys, may be null.
+   * @param offset the required offset to read.
+   * @param length the length of the new sequence.
+   * 
+   * @return the allocated or resized array, same array if no such operations
+   * are required.
+   */
+  private Any[] ensureArray(Any[] holder_value, int offset, int length)
+  {
+    if (holder_value == null)
+      return new Any[offset + length];
+    else if (holder_value.length < offset + length)
+      {
+        Any[] value = new Any[offset + length];
+        System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+        return value;
+      }
+    else
+      return holder_value;
+  }
+
+  /**
+   * This method is required to represent the DataInputStream as a value type
+   * object.
+   * 
+   * @return a single entity "IDL:omg.org/CORBA/DataInputStream:1.0", always.
+   */
+  public String[] _truncatable_ids()
+  {
+    return new String[] { "IDL:omg.org/CORBA/DataInputStream:1.0" };
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1047 @@
+/* AbstractCdrOutput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.BigDecimalHelper;
+import gnu.CORBA.IOR;
+import gnu.CORBA.IorProvider;
+import gnu.CORBA.Minor;
+import gnu.CORBA.TypeCodeHelper;
+import gnu.CORBA.Unexpected;
+import gnu.CORBA.Version;
+import gnu.CORBA.GIOP.CharSets_OSF;
+import gnu.CORBA.GIOP.CodeSetServiceContext;
+import gnu.CORBA.typecodes.PrimitiveTypeCode;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.DataInputStream;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * A simple CORBA CDR (common data representation)
+ * output stream, writing data into the
+ * given {@link java.io.OutputStream}.
+ *
+ * The same class also implements the {@link DataInputStream},
+ * providing support for writing the value type objects
+ * in a user defined way.
+ * 
+ * TODO This class uses 16 bits per Unicode character only, as it was until
+ * jdk 1.4 inclusive.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public abstract class AbstractCdrOutput
+  extends org.omg.CORBA_2_3.portable.OutputStream
+  implements org.omg.CORBA.DataOutputStream
+{
+  /**
+   * The runtime, associated with this stream. This field is only used when 
+   * reading and writing value types and filled-in in gnu.CORBA.CDR.Vio.
+   */
+  public transient gnuRuntime runtime;  
+  
+  /**
+   * This instance is used to convert primitive data types into the
+   * byte sequences.
+   */
+  protected AbstractDataOutput b;
+
+  /**
+   * The associated orb, if any.
+   */
+  protected ORB orb;
+
+  /**
+   * The GIOP version.
+   */
+  protected Version giop = new Version(1, 2);
+
+  /**
+   * The code set information.
+   */
+  protected CodeSetServiceContext codeset;
+
+  /**
+   * The name of the currently used narrow charset.
+   */
+  private String narrow_charset;
+
+  /**
+   * The name of the currently used wide charset, null if
+   * the native wide charset is used.
+   */
+  private String wide_charset;
+
+  /**
+   * True if the native code set is used for narrow characters.
+   * If the set is native, no the intermediate Reader object
+   * is instantiated when writing characters.
+   */
+  private boolean narrow_native;
+
+  /**
+   * True if the native code set is used for wide characters.
+   * If the set is native, no the intermediate Reader object
+   * is instantiated when writing characters.
+   */
+  private boolean wide_native;
+
+  /**
+   * If true, the Little Endian encoding is used to write the
+   * data. Otherwise, the Big Endian encoding is used.
+   */
+  private boolean little_endian;
+
+  /**
+   * The stream whre the data are actually written.
+   */
+  private java.io.OutputStream actual_stream;
+
+  /**
+   * Creates the stream.
+   *
+   * @param writeTo a stream to write CORBA output to.
+   */
+  public AbstractCdrOutput(java.io.OutputStream writeTo)
+  {
+    setOutputStream(writeTo);
+    setCodeSet(CodeSetServiceContext.STANDARD);
+  }
+
+  /**
+   * Creates the stream, requiring the subsequent call
+   * of {@link #setOutputStream(java.io.OutputStream)}.
+   */
+  public AbstractCdrOutput()
+  {
+    setCodeSet(CodeSetServiceContext.STANDARD);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the
+   * stream is different from 0.
+   */
+  public abstract void setOffset(int an_offset);
+  
+  /**
+   * Clone all important settings to another stream.
+   */
+  public void cloneSettings(AbstractCdrOutput stream)
+  {
+    stream.setBigEndian(!little_endian);
+    stream.setCodeSet(getCodeSet());
+    stream.setVersion(giop);
+    stream.setOrb(orb);
+  }  
+
+  /**
+   * Set the current code set context.
+   */
+  public void setCodeSet(CodeSetServiceContext a_codeset)
+  {
+    this.codeset = a_codeset;
+    narrow_charset = CharSets_OSF.getName(codeset.char_data);
+    wide_charset = CharSets_OSF.getName(codeset.wide_char_data);
+
+    narrow_native = CharSets_OSF.NATIVE_CHARACTER == codeset.char_data;
+    wide_native = CharSets_OSF.NATIVE_WIDE_CHARACTER == codeset.wide_char_data;
+  }
+
+  /**
+   * Get the current code set context.
+   */
+  public CodeSetServiceContext getCodeSet()
+  {
+    return codeset;
+  }
+
+  /**
+   * Set the orb, associated with this stream.
+   * @param an_orb
+   */
+  public void setOrb(ORB an_orb)
+  {
+    orb = an_orb;
+  }
+
+  /**
+   * Set the output stream that receives the CORBA output.
+   *
+   * @param writeTo the stream.
+   */
+  public void setOutputStream(java.io.OutputStream writeTo)
+  {
+    if (little_endian)
+      b = new LittleEndianOutputStream(writeTo);
+    else
+      b = new BigEndianOutputStream(writeTo);
+
+    actual_stream = writeTo;
+  }
+
+  /**
+   * Set the GIOP version. Some data types are written differently
+   * for the different versions. The default version is 1.0 .
+   */
+  public void setVersion(Version giop_version)
+  {
+    giop = giop_version;
+  }
+
+  /**
+   * Specify if the stream should use the Big Endian (usual for java)
+   * or Little Encoding. The default is Big Endian.
+   *
+   * @param use_big_endian if true, use Big Endian, if false,
+   * use Little Endian.
+   */
+  public void setBigEndian(boolean use_big_endian)
+  {
+    little_endian = !use_big_endian;
+    setOutputStream(actual_stream);
+  }
+
+  /**
+   * Align the curretn position at the given natural boundary.
+   */
+  public abstract void align(int boundary);
+
+  /**
+   * Create the encapsulation stream, associated with the current
+   * stream. The encapsulated stream must be closed. When being
+   * closed, the encapsulation stream writes its buffer into
+   * this stream using the CORBA CDR encapsulation rules.
+   *
+   * It is not allowed to write to the current stream directly
+   * before the encapsulation stream is closed.
+   *
+   * The encoding (Big/Little Endian) inside the encapsulated
+   * sequence is the same as used into the parent stream.
+   *
+   * @return the encapsulated stream.
+   */
+  public AbstractCdrOutput createEncapsulation()
+  {
+    return new EncapsulationStream(this, !little_endian);
+  }
+
+  /**
+   * Return the associated {@link ORB}.
+   * @return the associated {@link ORB} or null is no such is set.
+   */
+  public ORB orb()
+  {
+    return orb;
+  }
+
+  /**
+   * Write a single byte.
+   * @param a byte to write (low 8 bits are written).
+   */
+  public void write(int n)
+  {
+    try
+      {
+        b.write(n);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Write bytes directly into the underlying stream.
+   */
+  public void write(byte[] x)
+             throws java.io.IOException
+  {
+    b.write(x);
+  }
+
+  /**
+   * Write bytes directly into the underlying stream.
+   */
+  public void write(byte[] x, int ofs, int len)
+             throws java.io.IOException
+  {
+    b.write(x, ofs, len);
+  }
+
+  /**
+   * Following the specification, this is not implemented.
+   * Override to get the functionality.
+   */
+  public void write_Context(Context context, ContextList contexts)
+  {
+    throw new NO_IMPLEMENT();
+  }
+
+  /**
+   * Read the CORBA object. The object is written form of the plain (not a
+   * string-encoded) IOR profile without the heading endian indicator. The
+   * responsible method for reading such data is {@link IOR.write_no_endian}.
+   * 
+   * The null value is written as defined in OMG specification (zero length
+   * string, followed by an empty set of profiles).
+   */
+  public void write_Object(org.omg.CORBA.Object x)
+  {
+    ORB w_orb = orb;
+    if (x instanceof IorProvider)
+      {
+        ((IorProvider) x).getIor()._write_no_endian(this);
+        return;
+      }
+    else if (x == null)
+      {
+        IOR.write_null(this);
+        return;
+      }
+    else if (x instanceof ObjectImpl)
+      {
+        Delegate d = ((ObjectImpl) x)._get_delegate();
+
+        if (d instanceof IorProvider)
+          {
+            ((IorProvider) d).getIor()._write_no_endian(this);
+            return;
+          }
+        else
+          {
+            ORB d_orb = d.orb(x);
+            if (d_orb != null)
+              w_orb = d_orb;
+          }
+      }
+
+    // Either this is not an ObjectImpl or it has the
+    // unexpected delegate. Try to convert via ORBs
+    // object_to_string().
+    if (w_orb != null)
+      {
+        IOR ior = IOR.parse(w_orb.object_to_string(x));
+        ior._write_no_endian(this);
+        return;
+      }
+    else
+      throw new BAD_OPERATION(
+        "Please set the ORB for this stream, cannot write "
+          + x.getClass().getName());
+  }
+
+  /**
+   * Write the TypeCode. This implementation delegates functionality
+   * to {@link cdrTypeCode}.
+   *
+   * @param x a TypeCode to write.
+   */
+  public void write_TypeCode(TypeCode x)
+  {
+    try
+      {
+        TypeCodeHelper.write(this, x);
+      }
+    catch (UserException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes an instance of the CORBA {@link Any}.
+   * This method writes the typecode, followed
+   * by value itself. In Any contains null
+   * (value not set), the {@link TCKind#tk_null}
+   * is written.
+   *
+   * @param x the {@link Any} to write.
+   */
+  public void write_any(Any x)
+  {
+    Streamable value = x.extract_Streamable();
+    if (value != null)
+      {
+        write_TypeCode(x.type());
+        value._write(this);
+      }
+    else
+      {
+        PrimitiveTypeCode p = new PrimitiveTypeCode(TCKind.tk_null);
+        write_TypeCode(p);
+      }
+  }
+
+  /**
+   * Writes a single byte, 0 for <code>false</code>,
+   * 1 for <code>true</code>.
+   *
+   * @param x the value to write
+   */
+  public void write_boolean(boolean x)
+  {
+    try
+      {
+        b.write(x ? 1 : 0);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the boolean array.
+   *
+   * @param x array
+   * @param ofs offset
+   * @param len length.
+   */
+  public void write_boolean_array(boolean[] x, int ofs, int len)
+  {
+    try
+      {
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.write(x [ i ] ? 1 : 0);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the lower byte of the passed parameter.
+   * @param x the char to write
+   *
+   * It is effective to write more characters at once.
+   */
+  public void write_char(char x)
+  {
+    try
+      {
+        if (narrow_native)
+          b.write(x);
+        else
+          {
+            OutputStreamWriter ow =
+              new OutputStreamWriter((OutputStream) b, narrow_charset);
+            ow.write(x);
+            ow.flush();
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the lower bytes of the passed array members.
+   *
+   * @param chars an array
+   * @param offsets offset
+   * @param length length
+   */
+  public void write_char_array(char[] chars, int offset, int length)
+  {
+    try
+      {
+        if (narrow_native)
+          {
+            for (int i = offset; i < offset + length; i++)
+              {
+                b.write(chars [ i ]);
+              }
+          }
+        else
+          {
+            OutputStreamWriter ow =
+              new OutputStreamWriter((OutputStream) b, narrow_charset);
+            ow.write(chars, offset, length);
+            ow.flush();
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the double value (IEEE 754 format).
+   */
+  public void write_double(double x)
+  {
+    try
+      {
+        align(8);
+        b.writeDouble(x);
+      }
+    catch (Exception ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the array of double values.
+   */
+  public void write_double_array(double[] x, int ofs, int len)
+  {
+    try
+      {
+        align(8);
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.writeDouble(x [ i ]);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes CORBA fixed, storing all digits but not the scale.
+   * The end of the record on <code>fixed</code> can
+   * be determined from its last byte.
+   */
+  public void write_fixed(BigDecimal fixed)
+  {
+    try
+      {
+        BigDecimalHelper.write(this, fixed);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+    catch (BadKind ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Write the float value (IEEE 754 format).
+   */
+  public void write_float(float x)
+  {
+    try
+      {
+        align(4);
+        b.writeFloat(x);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   *  Writes an array of the float values.
+   */
+  public void write_float_array(float[] x, int ofs, int len)
+  {
+    try
+      {
+        align(4);
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.writeFloat(x [ i ]);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the integer value (CORBA long, four bytes, high byte first).
+   * @param x the value to write.
+   */
+  public void write_long(int x)
+  {
+    try
+      {
+        align(4);
+        b.writeInt(x);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the array of integer (CORBA long) values.
+   *
+   * @param x value
+   * @param ofs offset
+   * @param len length
+   */
+  public void write_long_array(int[] x, int ofs, int len)
+  {
+    try
+      {
+        align(4);
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.writeInt(x [ i ]);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the long (CORBA long long) value, 8 bytes,
+   * high byte first.
+   *
+   * @param x the value to write.
+   */
+  public void write_longlong(long x)
+  {
+    try
+      {
+        align(8);
+        b.writeLong(x);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the array of longs (CORBA long longs) values.
+   *
+   * @param x value
+   * @param ofs offset
+   * @param len length
+   */
+  public void write_longlong_array(long[] x, int ofs, int len)
+  {
+    try
+      {
+        align(8);
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.writeLong(x [ i ]);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes this byte.
+   * @param x
+   */
+  public void write_octet(byte x)
+  {
+    try
+      {
+        b.writeByte(x);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the array of bytes (CORBA octets) values.
+   *
+   * @param x value
+   * @param ofs offset
+   * @param len length
+   */
+  public void write_octet_array(byte[] x, int ofs, int len)
+  {
+    try
+      {
+        b.write(x, ofs, len);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes first the size of array, and then the byte array using
+   * the {@link java.io.OutputStream#write(byte[]) }. The sequence
+   * being written is preceeded by the int, representing the array
+   * length.
+   */
+  public void write_sequence(byte[] buf)
+  {
+    try
+      {
+        write_long(buf.length);
+        write(buf);
+      }
+    catch (IOException ex)
+      {
+        MARSHAL t = new MARSHAL();
+        t.minor = Minor.CDR;
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+  /**
+   * Writes the contents of the provided stream.
+   * The sequence being written is preceeded by the int,
+   * representing the stream buffer length (the number of
+   * bytes being subsequently written).
+   */
+  public void write_sequence(BufferedCdrOutput from)
+  {
+    try
+      {
+        write_long(from.buffer.size());
+        from.buffer.writeTo(this);
+      }
+    catch (IOException ex)
+      {
+        MARSHAL t = new MARSHAL();
+        t.minor = Minor.CDR;
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+  /**
+   * Writes the two byte integer (short), high byte first.
+   *
+   * @param x the integer to write.
+   */
+  public void write_short(short x)
+  {
+    try
+      {
+        align(2);
+        b.writeShort(x);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the array of short (two byte integer) values.
+   *
+   * @param x value
+   * @param ofs offset
+   * @param len length
+   */
+  public void write_short_array(short[] x, int ofs, int len)
+  {
+    try
+      {
+        align(2);
+        for (int i = ofs; i < ofs + len; i++)
+          {
+            b.writeShort(x [ i ]);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the string. This implementation first calls
+   * String.getBytes() and then writes the length of the returned
+   * array (as CORBA ulong) and the returned array itself.
+   *
+   * The encoding information, if previously set, is taken
+   * into consideration.
+   *
+   * @param x the string to write.
+   */
+  public void write_string(String x)
+  {
+    try
+      {
+        byte[] ab = x.getBytes(narrow_charset);
+        write_long(ab.length + 1);
+        write(ab);
+
+        // write null terminator.
+        write(0);
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the CORBA unsigned long in the same way as CORBA long.
+   */
+  public void write_ulong(int x)
+  {
+    write_long(x);
+  }
+
+  /**
+   * Writes the array of CORBA unsigned longs in the same way as
+   * array of ordinary longs.
+   */
+  public void write_ulong_array(int[] x, int ofs, int len)
+  {
+    write_long_array(x, ofs, len);
+  }
+
+  /**
+   * Write the unsigned long long in the same way as an ordinary long long.
+   *
+   * @param x a value to write.
+   */
+  public void write_ulonglong(long x)
+  {
+    write_longlong(x);
+  }
+
+  /**
+   * Write the array of unsingel long longs in the same way
+   * an an array of the ordinary long longs.
+   */
+  public void write_ulonglong_array(long[] x, int ofs, int len)
+  {
+    write_longlong_array(x, ofs, len);
+  }
+
+  /**
+   * Write the unsigned short in the same way as an ordinary short.
+   */
+  public void write_ushort(short x)
+  {
+    write_short(x);
+  }
+
+  /**
+   * Write an array of unsigned short integersin the same way
+   * as an array of ordinary short integers.
+   */
+  public void write_ushort_array(short[] x, int ofs, int len)
+  {
+    write_short_array(x, ofs, len);
+  }
+
+  /**
+   * Writes the character as two byte short integer (Unicode value), high byte
+   * first. Writes in Big Endian, but never writes the endian indicator.
+   * 
+   * The character is always written using the native UTF-16BE charset because
+   * its size under arbitrary encoding is not evident.
+   */
+  public void write_wchar(char x)
+  {
+    try
+      {
+        if (giop.until_inclusive(1, 1))
+          {
+            align(2);
+
+            if (wide_native)
+              b.writeShort(x);
+            else
+              {
+                OutputStreamWriter ow = new OutputStreamWriter(
+                  (OutputStream) b, wide_charset);
+                ow.write(x);
+                ow.flush();
+              }
+          }
+        else if (wide_native)
+          {
+            b.writeByte(2);
+            b.writeChar(x);
+          }
+        else
+          {
+            String encoded = new String(new char[] { x });
+            byte[] bytes = encoded.getBytes(wide_charset);
+            b.write(bytes.length + 2);
+            b.write(bytes);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Write the array of wide chars.
+   * 
+   * @param chars the array of wide chars
+   * @param offset offset
+   * @param length length
+   * 
+   * The char array is always written using the native UTF-16BE charset because
+   * the character size under arbitrary encoding is not evident.
+   */
+  public void write_wchar_array(char[] chars, int offset, int length)
+  {
+    try
+      {
+        if (giop.until_inclusive(1, 1))
+          align(2);
+
+        if (wide_native)
+          {
+            for (int i = offset; i < offset + length; i++)
+              {
+                b.writeShort(chars [ i ]);
+              }
+          }
+        else
+          {
+            OutputStreamWriter ow =
+              new OutputStreamWriter((OutputStream) b, wide_charset);
+            ow.write(chars, offset, length);
+            ow.flush();
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /**
+   * Writes the length of the string in bytes (not characters) and
+   * then all characters as two byte unicode chars. Adds the
+   * Big Endian indicator, 0xFFFE, at the beginning and null wide char at
+   * the end.
+   *
+   * @param x the string to write.
+   */
+  public void write_wstring(String x)
+  {
+    try
+      {
+        if (giop.since_inclusive(1, 2))
+          {
+            byte[] bytes = x.getBytes(wide_charset);
+            write_sequence(bytes);
+          }
+        else
+          {
+            // Encoding with null terminator always in UTF-16.
+            // The wide null terminator needs extra two bytes.
+            write_long(2 * x.length() + 2);
+
+            for (int i = 0; i < x.length(); i++)
+              {
+                b.writeShort(x.charAt(i));
+              }
+
+            // Write null terminator.
+            b.writeShort(0);
+          }
+      }
+    catch (IOException ex)
+      {
+        Unexpected.error(ex);
+      }
+  }
+
+  /** {@inheritDoc} */
+  public void write_any_array(Any[] anys, int offset, int length)
+  {
+    for (int i = offset; i < offset + length; i++)
+      {
+        write_any(anys [ i ]);
+      }
+  }
+
+  public String[] _truncatable_ids()
+  {
+    /**@todo Implement this org.omg.CORBA.portable.ValueBase abstract method*/
+    throw new java.lang.UnsupportedOperationException("Method _truncatable_ids() not yet implemented.");
+  }
+
+  /** {@inheritDoc} */
+  public void write_Abstract(java.lang.Object value)
+  {
+    write_abstract_interface(value);
+  }
+
+  /** {@inheritDoc} */
+  public void write_Value(Serializable value)
+  {
+    write_value(value);
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,392 @@
+/* AbstractDataInput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.IOException;
+
+/**
+ * Some data input stream that can be either Big or
+ * Little Endian.
+ *
+ * This class reuses code from GNU Classpath DataInputStream.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ * @author Warren Levy (warrenl at cygnus.com)
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ */
+public interface AbstractDataInput
+{
+  /**
+   * This method reads bytes from the underlying stream into the specified
+   * byte array buffer.  It will attempt to fill the buffer completely, but
+   * may return a short count if there is insufficient data remaining to be
+   * read to fill the buffer.
+   *
+   * @param b The buffer into which bytes will be read.
+   *
+   * @return The actual number of bytes read, or -1 if end of stream reached
+   * before reading any bytes.
+   *
+   * @exception IOException If an error occurs.
+   */
+  int read(byte[] b)
+    throws IOException;
+
+  /**
+   * This method reads bytes from the underlying stream into the specified
+   * byte array buffer.  It will attempt to read <code>len</code> bytes and
+   * will start storing them at position <code>off</code> into the buffer.
+   * This method can return a short count if there is insufficient data
+   * remaining to be read to complete the desired read length.
+   *
+   * @param b The buffer into which bytes will be read.
+   * @param off The offset into the buffer to start storing bytes.
+   * @param len The requested number of bytes to read.
+   *
+   * @return The actual number of bytes read, or -1 if end of stream reached
+   * before reading any bytes.
+   *
+   * @exception IOException If an error occurs.
+   */
+  int read(byte[] b, int off, int len)
+    throws IOException;
+
+  /**
+   * This method reads a Java boolean value from an input stream.  It does
+   * so by reading a single byte of data.  If that byte is zero, then the
+   * value returned is <code>false</code>.  If the byte is non-zero, then
+   * the value returned is <code>true</code>.
+   * <p>
+   * This method can read a <code>boolean</code> written by an object
+   * implementing the <code>writeBoolean()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>boolean</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading
+   * the boolean
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeBoolean
+   */
+  boolean readBoolean()
+               throws IOException;
+
+  /**
+   * This method reads a Java byte value from an input stream.  The value
+   * is in the range of -128 to 127.
+   * <p>
+   * This method can read a <code>byte</code> written by an object
+   * implementing the <code>writeByte()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>byte</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the byte
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeByte
+   */
+  byte readByte()
+         throws IOException;
+
+  /**
+   * This method reads a Java <code>char</code> value from an input stream.
+   * It operates by reading two bytes from the stream and converting them to
+   * a single 16-bit Java <code>char</code>.  The two bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to a <code>char</code> in
+   * the following manner:
+   * <p>
+   * <code>(char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)</code>
+   * <p>
+   * This method can read a <code>char</code> written by an object
+   * implementing the <code>writeChar()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>char</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the char
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeChar
+   */
+  char readChar()
+         throws IOException;
+
+  /**
+   * This method reads a Java double value from an input stream.  It operates
+   * by first reading a <code>long</code> value from the stream by calling the
+   * <code>readLong()</code> method in this interface, then converts
+   * that <code>long</code> to a <code>double</code> using the
+   * <code>longBitsToDouble</code> method in the class
+   * <code>java.lang.Double</code>
+   * <p>
+   * This method can read a <code>double</code> written by an object
+   * implementing the <code>writeDouble()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>double</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading
+   * the double
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeDouble
+   * @see java.lang.Double#longBitsToDouble
+   */
+  double readDouble()
+             throws IOException;
+
+  /**
+   * This method reads a Java float value from an input stream.  It
+   * operates by first reading an <code>int</code> value from the
+   * stream by calling the <code>readInt()</code> method in this
+   * interface, then converts that <code>int</code> to a
+   * <code>float</code> using the <code>intBitsToFloat</code> method
+   * in the class <code>java.lang.Float</code>
+   * <p>
+   * This method can read a <code>float</code> written by an object
+   * implementing the <code>writeFloat()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>float</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the float
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeFloat
+   * @see java.lang.Float#intBitsToFloat
+   */
+  float readFloat()
+           throws IOException;
+
+  /**
+   * This method reads raw bytes into the passed array until the array is
+   * full.  Note that this method blocks until the data is available and
+   * throws an exception if there is not enough data left in the stream to
+   * fill the buffer.  Note also that zero length buffers are permitted.
+   * In this case, the method will return immediately without reading any
+   * bytes from the stream.
+   *
+   * @param b The buffer into which to read the data
+   *
+   * @exception EOFException If end of file is reached before filling the
+   * buffer
+   * @exception IOException If any other error occurs
+   */
+  void readFully(byte[] b)
+          throws IOException;
+
+  /**
+   * This method reads a Java <code>int</code> value from an input stream
+   * It operates by reading four bytes from the stream and converting them to
+   * a single Java <code>int</code>.  The bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> through <code>byte4</code> represent
+   * the first four bytes read from the stream, they will be
+   * transformed to an <code>int</code> in the following manner:
+   * <p>
+   * <code>(int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) +
+   * ((byte3 & 0xFF)<< 8) + (byte4 & 0xFF)))</code>
+   * <p>
+   * The value returned is in the range of -2147483648 to 2147483647.
+   * <p>
+   * This method can read an <code>int</code> written by an object
+   * implementing the <code>writeInt()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>int</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the int
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeInt
+   */
+  int readInt()
+       throws IOException;
+
+  /**
+   * This method reads a Java <code>long</code> value from an input stream
+   * It operates by reading eight bytes from the stream and converting them to
+   * a single Java <code>long</code>.  The bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> through <code>byte8</code> represent
+   * the first eight bytes read from the stream, they will be
+   * transformed to an <code>long</code> in the following manner:
+   * <p>
+   * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) +
+   * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) +
+   * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) +
+   * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF)))
+   * </code>
+   * <p>
+   * The value returned is in the range of -9223372036854775808 to
+   * 9223372036854775807.
+   * <p>
+   * This method can read an <code>long</code> written by an object
+   * implementing the <code>writeLong()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>long</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the long
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeLong
+   */
+  long readLong()
+         throws IOException;
+
+  /**
+   * This method reads a signed 16-bit value into a Java in from the
+   * stream.  It operates by reading two bytes from the stream and
+   * converting them to a single 16-bit Java <code>short</code>.  The
+   * two bytes are stored most significant byte first (i.e., "big
+   * endian") regardless of the native host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to a <code>short</code>. in
+   * the following manner:
+   * <p>
+   * <code>(short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF))</code>
+   * <p>
+   * The value returned is in the range of -32768 to 32767.
+   * <p>
+   * This method can read a <code>short</code> written by an object
+   * implementing the <code>writeShort()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>short</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeShort
+   */
+  short readShort()
+           throws IOException;
+
+  /**
+   * This method reads 8 unsigned bits into a Java <code>int</code>
+   * value from the stream. The value returned is in the range of 0 to
+   * 255.
+   * <p>
+   * This method can read an unsigned byte written by an object
+   * implementing the <code>writeUnsignedByte()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The unsigned bytes value read as a Java <code>int</code>.
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeByte
+   */
+  int readUnsignedByte()
+                throws IOException;
+
+  /**
+   * This method reads 16 unsigned bits into a Java int value from the stream.
+   * It operates by reading two bytes from the stream and converting them to
+   * a single Java <code>int</code>  The two bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to an <code>int</code> in
+   * the following manner:
+   * <p>
+   * <code>(int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF))</code>
+   * <p>
+   * The value returned is in the range of 0 to 65535.
+   * <p>
+   * This method can read an unsigned short written by an object
+   * implementing the <code>writeUnsignedShort()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The unsigned short value read as a Java <code>int</code>
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeShort
+   */
+  int readUnsignedShort()
+                 throws IOException;
+
+  /**
+   * Read a single byte.
+   *
+   * @return a byte, extracted from the stream or -1 if
+   * EOF has been reached.
+   * @throws IOException
+   */
+  public int read()
+           throws IOException;
+
+  /**
+   * This method attempts to skip and discard the specified number of bytes
+   * in the input stream.  It may actually skip fewer bytes than requested.
+   * This method will not skip any bytes if passed a negative number of bytes
+   * to skip.
+   *
+   * @param n The requested number of bytes to skip.
+   *
+   * @return The requested number of bytes to skip.
+   *
+   * @exception IOException If an error occurs.
+   * @specnote The JDK docs claim that this returns the number of bytes
+   *  actually skipped. The JCL claims that this method can throw an
+   *  EOFException. Neither of these appear to be true in the JDK 1.3's
+   *  implementation. This tries to implement the actual JDK behaviour.
+   */
+  int skipBytes(int n)
+         throws IOException;
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataOutput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataOutput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataOutput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AbstractDataOutput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,185 @@
+/* AbstractDataOutput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.IOException;
+
+/**
+ * An abstract data output stream that could write data in either
+ * Big Endian or Little Endian format.
+ *
+ * This class reuses code from GNU Classpath DataOutputStream.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ * @author Warren Levy (warrenl at cygnus.com)
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ */
+public interface AbstractDataOutput
+{
+  /**
+   * This method flushes any unwritten bytes to the underlying stream.
+   *
+   * @exception IOException If an error occurs.
+   */
+  void flush()
+      throws IOException;
+
+  /**
+   * This method writes the specified byte (passed as an <code>int</code>)
+   * to the underlying output stream.
+   *
+   * @param value The <code>byte</code> to write, passed as an <code>int</code>.
+   *
+   * @exception IOException If an error occurs.
+   */
+  void write(int value)
+      throws IOException;
+
+  /**
+   * This method writes <code>len</code> bytes from the specified byte array
+   * <code>buf</code> starting at position <code>offset</code> into the
+   * buffer to the underlying output stream.
+   *
+   * @param buf The byte array to write from.
+   * @param offset The index into the byte array to start writing from.
+   * @param len The number of bytes to write.
+   *
+   * @exception IOException If an error occurs.
+   */
+  void write(byte[] buf, int offset, int len)
+      throws IOException;
+
+  /**
+   * Write the complete byte array.
+   * @throws IOException
+   */
+  void write(byte[] buf)
+      throws IOException;
+
+  /**
+   * This method writes a Java boolean value to an output stream.  If
+   * <code>value</code> is <code>true</code>, a byte with the value of
+   * 1 will be written, otherwise a byte with the value of 0 will be
+   * written.
+   *
+   * The value written can be read using the <code>readBoolean</code>
+   * method in <code>DataInput</code>.
+   *
+   * @param value The <code>boolean</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeBoolean(boolean value)
+             throws IOException;
+
+  /**
+   * This method writes a Java byte value to an output stream.  The
+   * byte to be written will be in the lowest 8 bits of the
+   * <code>int</code> value passed.
+   *
+   * The value written can be read using the <code>readByte</code> or
+   * <code>readUnsignedByte</code> methods in <code>DataInput</code>.
+   *
+   * @param value The <code>byte</code> to write to the stream, passed as
+   * the low eight bits of an <code>int</code>.
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeByte(int value)
+          throws IOException;
+
+  /**
+   * This method writes a Java short value to an output stream.  The
+   * char to be written will be in the lowest 16 bits of the <code>int</code>
+   * value passed.
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeShort(int value)
+           throws IOException;
+
+  /**
+   * This method writes a Java char value to an output stream.  The
+   * char to be written will be in the lowest 16 bits of the <code>int</code>
+   * value passed.
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeChar(int value)
+          throws IOException;
+
+  /**
+   * This method writes a Java int value to an output stream.
+   *
+   * @param value The <code>int</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeInt(int value)
+         throws IOException;
+
+  /**
+   * This method writes a Java long value to an output stream.
+   *
+   * @param value The <code>long</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeLong(long value)
+          throws IOException;
+
+  /**
+   * This method writes a Java <code>float</code> value to the stream.
+   * @param value The <code>float</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeFloat(float value)
+           throws IOException;
+
+  /**
+   * This method writes a Java <code>double</code> value to the stream.
+   *
+   * @param value The <code>double</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   */
+  void writeDouble(double value)
+            throws IOException;
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,131 @@
+/* AligningInput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.ByteArrayInputStream;
+
+import org.omg.CORBA.BAD_PARAM;
+
+/**
+ * The input stream with the possibility to align on the
+ * word (arbitrary size) boundary.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class AligningInput
+  extends ByteArrayInputStream
+{
+  /**
+   * The alignment offset.
+   */
+  private int offset = 0;
+
+  /**
+   * Create a stream, reading form the given buffer.
+   *
+   * @param a_buffer a buffer to read from.
+   */
+  public AligningInput(byte[] a_buffer)
+  {
+    super(a_buffer);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the
+   * stream is different from 0.
+   */
+  public void setOffset(int an_offset)
+  {
+    offset = an_offset;
+  }
+
+  /**
+   * Skip several bytes, aligning the internal pointer on the
+   * selected boundary.
+   *
+   * @throws BAD_PARAM, minor code 0, the alignment is not possible,
+   * usually due the wrong parameter value.
+   */
+  public void align(int alignment)
+  {
+    try
+      {
+        int d = (pos + offset) % alignment;
+        if (d > 0)
+          {
+            skip(alignment - d);
+          }
+      }
+    catch (Exception ex)
+      {
+        BAD_PARAM p = new BAD_PARAM("Unable to align at " + alignment);
+        p.initCause(ex);
+        throw p;
+      }
+  }
+
+  /**
+   * Get the byte buffer, from where the data are read.
+   */
+  public byte[] getBuffer()
+  {
+    return buf;
+  }
+  
+  /**
+   * Get the current position in the buffer.
+   * 
+   * @return The position in the buffer, taking offset into consideration.
+   */
+  public int getPosition()
+  {
+    return pos + offset;
+  }  
+  
+  /**
+   * Jump to the given position, taking offset into consideration.
+   */
+  public void seek(int position)
+  {
+    if (position < offset || position > (count+offset))
+      throw new ArrayIndexOutOfBoundsException(position
+        + " is out of valid ["+offset+".." + (count+offset) + "[ range");
+    pos = position - offset;
+  }  
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningOutput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningOutput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningOutput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/AligningOutput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,148 @@
+/* AligningOutput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.ByteArrayOutputStream;
+
+import org.omg.CORBA.BAD_PARAM;
+
+/**
+ * The input stream with the possibility to align on the
+ * word (arbitrary size) boundary.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class AligningOutput
+  extends ByteArrayOutputStream
+{
+  /**
+   * The alignment offset.
+   */
+  private int offset = 0;
+
+  /**
+   * Create a stream with the default intial buffer size.
+   */
+  public AligningOutput()
+  {
+  }
+
+  /**
+   * Create a stream with the given intial buffer size.
+   */
+  public AligningOutput(int initial_size)
+  {
+    super(initial_size);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the
+   * stream is different from 0.
+   */
+  public void setOffset(int an_offset)
+  {
+    offset = an_offset;
+  }
+
+  /**
+   * Skip several bytes, aligning the internal pointer on the
+   * selected boundary.
+   *
+   * @throws BAD_PARAM, minor code 0, the alignment is not possible,
+   * usually due the wrong parameter value.
+   */
+  public void align(int alignment)
+  {
+    try
+      {
+        int d = (count + offset) % alignment;
+        if (d > 0)
+          {
+            skip(alignment - d);
+          }
+      }
+    catch (Exception ex)
+      {
+        BAD_PARAM p = new BAD_PARAM("Unable to align at " + alignment);
+        p.initCause(ex);
+        throw p;
+      }
+  }
+
+  /**
+   * Write the specified number of zero bytes.
+   *
+   * @param bytes the number of zero bytes to write.
+   */
+  public void skip(int bytes)
+  {
+    for (int i = 0; i < bytes; i++)
+      {
+        write(0);
+      }
+  }
+  
+  /**
+   * Get the current position in the buffer.
+   * 
+   * @return The position in the buffer, taking offset into consideration.
+   */
+  public int getPosition()
+  {
+    return size()+offset;
+  }
+  
+  /**
+   * Seek to the given position (not in use).
+   */
+  public void seek(int position)
+  {
+    count = position - offset;
+  }
+  
+  /**
+   * Get the buffer without copying it. Use with care.
+   */
+  public byte[] getBuffer()
+  {
+    return buf;
+  }
+  
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/ArrayValueHelper.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/ArrayValueHelper.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/ArrayValueHelper.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/ArrayValueHelper.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,254 @@
+/* ArrayValueHelper.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.ObjectCreator;
+
+import org.omg.CORBA.BooleanSeqHelper;
+import org.omg.CORBA.CharSeqHelper;
+import org.omg.CORBA.DoubleSeqHelper;
+import org.omg.CORBA.FloatSeqHelper;
+import org.omg.CORBA.LongLongSeqHelper;
+import org.omg.CORBA.LongSeqHelper;
+import org.omg.CORBA.OctetSeqHelper;
+import org.omg.CORBA.ShortSeqHelper;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+import java.lang.reflect.Array;
+import java.rmi.Remote;
+
+import javax.rmi.CORBA.Util;
+import javax.rmi.CORBA.ValueHandler;
+
+/**
+ * Writes arrays as a boxed value types. A single instance is used to write a
+ * single array. This class is only used with RMI/IIOP, to handle array boxed
+ * values.
+ * 
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+class ArrayValueHelper
+  implements BoxedValueHelper
+{
+  /**
+   * The value handler (one for all instances).
+   */
+  static ValueHandler handler = Util.createValueHandler();
+
+  /**
+   * A class of the array being written.
+   */
+  Class arrayClass;
+
+  /**
+   * The array component class.
+   */
+  Class component;
+
+  /**
+   * The array component repository Id.
+   */
+  String componentId;
+
+  /**
+   * If true, the array members are written as objects rather than as values.
+   * True for Remotes and CORBA objects.
+   */
+  boolean written_as_object()
+  {
+    return org.omg.CORBA.Object.class.isAssignableFrom(component)
+      || Remote.class.isAssignableFrom(component);
+  }
+
+  /**
+   * Creates the instance of the helper to write this specific array class.
+   */
+  ArrayValueHelper(Class an_arrayClass)
+  {
+    arrayClass = an_arrayClass;
+  }
+
+  /**
+   * Get the array repository Id that will be the RMI repository id.
+   */
+  public String get_id()
+  {
+    return ObjectCreator.getRepositoryId(arrayClass);
+  }
+
+  /**
+   * Read the array from the input stream.
+   */
+  public Serializable read_value(InputStream input)
+  {
+    if (input instanceof HeadlessInput)
+      {
+        ((HeadlessInput) input).subsequentCalls = true;
+      }
+
+    component = arrayClass.getComponentType();
+
+    if (component.equals(byte.class))
+      return OctetSeqHelper.read(input);
+    else if (component.equals(String.class))
+      {
+        // String array is optimized because this may be frequent.
+        String[] s = new String[input.read_long()];
+
+        for (int i = 0; i < s.length; i++)
+          s[i] = (String) Vio.read(input, Vio.m_StringValueHelper);
+        return s;
+      }
+    else if (component.equals(int.class))
+      return LongSeqHelper.read(input);
+    else if (component.equals(long.class))
+      return LongLongSeqHelper.read(input);
+    else if (component.equals(double.class))
+      return DoubleSeqHelper.read(input);
+    else if (component.equals(float.class))
+      return FloatSeqHelper.read(input);
+    else if (component.equals(boolean.class))
+      return BooleanSeqHelper.read(input);
+    else if (component.equals(short.class))
+      return ShortSeqHelper.read(input);
+    else if (component.equals(char.class))
+      return CharSeqHelper.read(input);
+    else
+      {
+        // Read others, use reflection.
+        int n = input.read_long();
+
+        gnuValueStream s = null;
+
+        Serializable array = (Serializable) Array.newInstance(component, n);
+        if (written_as_object())
+          for (int i = 0; i < n; i++)
+            {
+              gnuRuntime g;
+              int position;
+              if (input instanceof gnuValueStream)
+                {
+                  s = (gnuValueStream) input;
+                  g = s.getRunTime();
+                  position = s.getPosition();
+                }
+              else
+                {
+                  g = null;
+                  position = -1;
+                }
+
+              if (input instanceof HeadlessInput)
+                ((HeadlessInput) input).subsequentCalls = true;
+
+              Object o = handler.readValue(input, position, component, null, g);
+              Array.set(array, i, o);
+            }
+        else
+          for (int i = 0; i < n; i++)
+            Array.set(array, i, Vio.read(input, component));
+        return array;
+      }
+  }
+
+  /**
+   * Write the array to the input stream.
+   */
+  public void write_value(OutputStream output, Serializable value)
+  {
+    if (output instanceof gnuValueStream)
+      {
+        gnuRuntime r = ((gnuValueStream) output).getRunTime();
+        if (r != null)
+          r.target = null;
+      }
+
+    if (value instanceof byte[])
+      OctetSeqHelper.write(output, (byte[]) value);
+    else if (value instanceof String[])
+      {
+        String[] s = (String[]) value;
+        output.write_long(s.length);
+        for (int i = 0; i < s.length; i++)
+          Vio.write(output, s[i], Vio.m_StringValueHelper);
+      }
+    else if (value instanceof int[])
+      LongSeqHelper.write(output, (int[]) value);
+    else if (value instanceof long[])
+      LongLongSeqHelper.write(output, (long[]) value);
+    else if (value instanceof double[])
+      DoubleSeqHelper.write(output, (double[]) value);
+    else if (value instanceof float[])
+      FloatSeqHelper.write(output, (float[]) value);
+    else if (value instanceof boolean[])
+      BooleanSeqHelper.write(output, (boolean[]) value);
+    else if (value instanceof short[])
+      ShortSeqHelper.write(output, (short[]) value);
+    else if (value instanceof char[])
+      CharSeqHelper.write(output, (char[]) value);
+    else
+      {
+        // Write others, use reflection.
+        component = arrayClass.getComponentType();
+
+        int n = Array.getLength(value);
+        output.write_long(n);
+        if (written_as_object())
+          for (int i = 0; i < n; i++)
+            {
+              Object o = Array.get(value, i);
+              if (o == null)
+                output.write_Object(null);
+              else
+                // CORBA objects have another notation.
+                handler.writeValue(output, (Serializable) o);
+            }
+        else
+          {
+            for (int i = 0; i < n; i++)
+              Vio.write(output, (Serializable) Array.get(value, i),
+                component);
+          }
+
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianInputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianInputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianInputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianInputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,61 @@
+/* BigEndianInputStream.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.DataInputStream;
+import java.io.InputStream;
+
+/**
+ * As java uses Big Endian by default, this class is directly derived
+ * form DataInputStream.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class BigEndianInputStream
+  extends DataInputStream
+  implements AbstractDataInput
+{
+  /**
+   * Delegates to the parent constructor.
+   */
+  public BigEndianInputStream(InputStream in)
+  {
+    super(in);
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianOutputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianOutputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianOutputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BigEndianOutputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,62 @@
+/* BigEndianOutputStream.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.DataOutputStream;
+import java.io.OutputStream;
+
+/**
+ * A stream to read the data in Big Endian format. This class is
+ * directly derived from DataOutputStream that uses the Big
+ * Endian.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class BigEndianOutputStream
+  extends DataOutputStream
+  implements AbstractDataOutput
+{
+  /**
+   * Delegate functionality to the parent constructor.
+   */
+  public BigEndianOutputStream(OutputStream out)
+  {
+    super(out);
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferedCdrOutput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferedCdrOutput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferedCdrOutput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferedCdrOutput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,156 @@
+/* BufferedCdrOutput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.ByteArrayOutputStream;
+
+/**
+ * A CORBA output stream, writing data into the internal buffer ({@link ByteArrayOutputStream}).
+ * 
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class BufferedCdrOutput
+  extends AbstractCdrOutput
+  implements gnuValueStream
+{
+  /**
+   * Use serialVersionUID for interoperability.
+   */
+  private static final long serialVersionUID = 1;
+
+  /**
+   * The byte buffer.
+   */
+  public final AligningOutput buffer;
+
+  /**
+   * Creates the instance with the given initial buffer size.
+   * 
+   * @param bufSize the buffer size.
+   */
+  public BufferedCdrOutput(int bufSize)
+  {
+    buffer = new AligningOutput(bufSize);
+    setOutputStream(buffer);
+  }
+
+  /**
+   * Creates the instance with the default buffer size.
+   */
+  public BufferedCdrOutput()
+  {
+    buffer = new AligningOutput();
+    setOutputStream(buffer);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the stream is
+   * different from 0.
+   */
+  public void setOffset(int an_offset)
+  {
+    buffer.setOffset(an_offset);
+  }
+
+  /**
+   * Align the curretn position at the given natural boundary.
+   */
+  public void align(int boundary)
+  {
+    buffer.align(boundary);
+  }
+
+  /**
+   * Return the input stream that reads the previously written values.
+   */
+  public org.omg.CORBA.portable.InputStream create_input_stream()
+  {
+    BufferredCdrInput in = new BufferredCdrInput(buffer.toByteArray());
+    in.setOrb(orb);
+
+    in.setVersion(giop);
+    in.setCodeSet(getCodeSet());
+
+    return in;
+  }
+
+  /**
+   * Resets (clears) the buffer.
+   */
+  public void reset()
+  {
+    buffer.reset();
+    setOutputStream(buffer);
+  }
+
+  /**
+   * Get the current position in the buffer.
+   * 
+   * @return The position in the buffer, taking offset into consideration.
+   */
+  public int getPosition()
+  {
+    return buffer.getPosition();
+  }
+
+  /**
+   * Get the associated RunTime.
+   */
+  public gnuRuntime getRunTime()
+  {
+    return runtime;
+  }
+
+  /**
+   * Replace the instance of RunTime.
+   */
+  public void setRunTime(gnuRuntime a_runtime)
+  {
+    runtime = a_runtime;
+  }
+
+  /**
+   * Seek to the given position.
+   */
+  public void seek(int position)
+  {
+    buffer.seek(position);
+  }
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferredCdrInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferredCdrInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferredCdrInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/BufferredCdrInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,153 @@
+/* BufferredCdrInput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+
+/**
+ * The CDR input stream that reads data from the byte buffer.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class BufferredCdrInput
+  extends AbstractCdrInput 
+  implements gnuValueStream
+{
+  /** 
+   * Use serialVersionUID for interoperability. 
+   */
+  private static final long serialVersionUID = 1;
+  
+  /**
+   * The byte array input stream to read data from.
+   */
+  public final AligningInput buffer;
+
+  /**
+   * Creates the CDR input stream that reads from the given buffer
+   * array.
+   *
+   * @param a_buffer an array to read from.
+   */
+  public BufferredCdrInput(byte[] a_buffer)
+  {
+    buffer = new AligningInput(a_buffer);
+    setInputStream(buffer);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the
+   * stream is different from 0.
+   */
+  public void setOffset(int offset)
+  {
+    buffer.setOffset(offset);
+  }
+
+  /**
+   * Skip several bytes, aligning the internal pointer on the
+   * selected boundary.
+   */
+  public void align(int alignment)
+  {
+    buffer.align(alignment);
+  }
+
+  /**
+   * Mark the current position.
+   * @param ahead
+   */
+  public synchronized void mark(int ahead)
+  {
+    buffer.mark(ahead);
+  }
+
+  /**
+   * Checks if marking is supported.
+   * @return
+   */
+  public boolean markSupported()
+  {
+    return buffer.markSupported();
+  }
+
+  /**
+   * Resets the stream to the previously marked position.
+   */
+  public void reset()
+  {
+    buffer.reset();
+    setInputStream(buffer);
+  }
+  
+  /**
+   * Get the current position in the buffer.
+   * 
+   * @return The position in the buffer, taking offset into consideration.
+   */
+  public int getPosition()
+  {
+    return buffer.getPosition();
+  }
+  
+  /**
+   * Jump to the given position, taking offset into consideration.
+   */
+  public void seek(int position)
+  {
+    buffer.seek(position);
+    setInputStream(buffer);
+  }
+  
+  /**
+   * Get the associated RunTime.
+   */
+  public gnuRuntime getRunTime()
+  {
+    return runtime;
+  }  
+  
+  /**
+   * Replace the instance of RunTime.
+   */
+  public void setRunTime(gnuRuntime a_runtime)
+  {
+    runtime = a_runtime;
+  }
+  
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/EncapsulationStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/EncapsulationStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/EncapsulationStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/EncapsulationStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,147 @@
+/* EncapsulationOutput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.IOException;
+
+/**
+ * The encapsulated data, as they are defined by CORBA specification.
+ * This includes the extra 0 byte (Big endian) in the beginning.
+ * When written to the parent steam, the encapsulated data are preceeded
+ * by the data length in bytes.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class EncapsulationStream
+  extends AbstractCdrOutput
+{
+  /**
+   * The Big Endian (most siginificant byte first flag).
+   */
+  public static final byte BIG_ENDIAN = 0;
+
+  /**
+   * The Little Endian (least siginificant byte first flag).
+   */
+  public static final byte LITTLE_ENDIAN = 1;
+
+  /**
+   * The byte buffer.
+   */
+  public final AligningOutput buffer;
+
+  /**
+   * The stream, where the data are being encapsulated.
+   */
+  public final org.omg.CORBA.portable.OutputStream parent;
+
+  /**
+   * Create the EncapsulationOutput with the given parent stream
+   * and the specified encoding.
+   */
+  public EncapsulationStream(org.omg.CORBA.portable.OutputStream _parent,
+                            boolean use_big_endian)
+  {
+    super();
+    setBigEndian(use_big_endian);
+    buffer = new AligningOutput();
+    setOutputStream(buffer);
+    parent = _parent;
+    write(use_big_endian?BIG_ENDIAN:LITTLE_ENDIAN);
+  }
+
+  /**
+   * Set the alignment offset, if the index of the first byte in the
+   * stream is different from 0.
+   */
+  public void setOffset(int an_offset)
+  {
+    buffer.setOffset(an_offset);
+  }
+
+  /**
+   * Align the curretn position at the given natural boundary.
+   */
+  public void align(int boundary)
+  {
+    buffer.align(boundary);
+  }
+
+  /**
+   * Writes the content of the encapsulated output into the parent
+   * buffer.
+   */
+  public void close()
+  {
+    try
+      {
+        parent.write_long(buffer.size());
+        buffer.writeTo(parent);
+      }
+    catch (IOException ex)
+      {
+        InternalError err = new InternalError();
+        err.initCause(ex);
+        throw err;
+      }
+  }
+
+  /**
+   * Return the input stream that reads the previously written values.
+   */
+  public org.omg.CORBA.portable.InputStream create_input_stream()
+  {
+    BufferredCdrInput in = new BufferredCdrInput(buffer.toByteArray());
+    in.setOrb(orb);
+
+    in.setVersion(giop);
+    in.setCodeSet(getCodeSet());
+
+    return in;
+  }
+
+  /**
+   * Resets (clears) the buffer.
+   */
+  public void reset()
+  {
+    buffer.reset();
+    setOutputStream(buffer);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/HeadlessInput.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/HeadlessInput.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/HeadlessInput.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/HeadlessInput.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,749 @@
+/* HeadlessInput.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.AnySeqHolder;
+import org.omg.CORBA.BooleanSeqHolder;
+import org.omg.CORBA.CharSeqHolder;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.DataInputStream;
+import org.omg.CORBA.DoubleSeqHolder;
+import org.omg.CORBA.FloatSeqHolder;
+import org.omg.CORBA.LongLongSeqHolder;
+import org.omg.CORBA.LongSeqHolder;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.OctetSeqHolder;
+import org.omg.CORBA.Principal;
+import org.omg.CORBA.ShortSeqHolder;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.ULongLongSeqHolder;
+import org.omg.CORBA.ULongSeqHolder;
+import org.omg.CORBA.UShortSeqHolder;
+import org.omg.CORBA.WCharSeqHolder;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * Substitutes the main stream in factories when the header is already behind.
+ * Overrides methods that may be invoked from the factory, forcing not to read
+ * the header if called first time on this stream.
+ * 
+ * This stream reverts to default behavior if one or more call are made (reading
+ * value types that are nested fields of the value type).
+ * 
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class HeadlessInput
+  extends org.omg.CORBA_2_3.portable.InputStream
+  implements DataInputStream, gnuValueStream
+{
+  /**
+   * Use serialVersionUID for interoperability.
+   */
+  private static final long serialVersionUID = 1;
+
+  /**
+   * Indicates that no positional information is available.
+   */
+  static final int NONE = -1;
+
+  /**
+   * If true, this is not the first call.
+   */
+  public boolean subsequentCalls;
+
+  /**
+   * The enclosed stream.
+   */
+  final BufferredCdrInput stream;
+
+  /**
+   * Create an instance, reading from the given buffer.
+   * 
+   * @param a_stram a stream from where the data will be read.
+   * @param inheritSettings a stream from that endian and other settings are
+   * inherited.
+   */
+  public HeadlessInput(BufferredCdrInput a_stream, InputStream inheritSettings)
+  {
+    stream = a_stream;
+
+    if (inheritSettings instanceof AbstractCdrInput)
+      {
+        AbstractCdrInput t = (AbstractCdrInput) inheritSettings;
+        t.cloneSettings(stream);
+      }
+    else if (stream.orb() == null)
+      stream.setOrb(inheritSettings.orb());
+
+    if (inheritSettings instanceof gnuValueStream
+      && stream.getRunTime() == null)
+      {
+        stream.setRunTime(((gnuValueStream) inheritSettings).getRunTime());
+      }
+  }
+
+  /**
+   * Tries to read using boxed value helper.
+   */
+  public Serializable read_value(BoxedValueHelper helper)
+  {
+    if (subsequentCalls)
+      return stream.read_value(helper);
+    else
+      {
+        subsequentCalls = true;
+        return helper.read_value(this);
+      }
+  }
+
+  /**
+   * Tries to locate a factory using repository id.
+   */
+  public Serializable read_value(String repository_id)
+  {
+    if (subsequentCalls)
+      return stream.read_value(repository_id);
+    else
+      {
+        subsequentCalls = true;
+        Serializable value = (Serializable) Vio.readValue(this, NONE, null,
+          null, repository_id, null, null);
+        return value;
+      }
+  }
+
+  /**
+   * Try to read when having an unitialised value.
+   */
+  public Serializable read_value(Serializable value)
+  {
+    if (subsequentCalls)
+      return stream.read_value(value);
+    else
+      {
+        subsequentCalls = true;
+        value = (Serializable) Vio.readValue(this, NONE, value, null, null,
+          null, null);
+        return value;
+      }
+  }
+
+  /**
+   * Try to read when having an unitialised value.
+   */
+  public Serializable read_value(Class clz)
+  {
+    if (subsequentCalls)
+      return stream.read_value(clz);
+    else
+      {
+        try
+          {
+            subsequentCalls = true;
+            Serializable value = (Serializable) Vio.instantiateAnyWay(clz);
+            value = (Serializable) Vio.readValue(this, NONE, value, null, null,
+              null, null);
+            return value;
+          }
+        catch (Exception ex)
+          {
+            MARSHAL m = new MARSHAL("Can't read an instance of "
+              + clz.getName());
+            m.minor = Minor.Value;
+            m.initCause(ex);
+            throw m;
+          }
+      }
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int available()
+    throws IOException
+  {
+    return stream.available();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void close()
+    throws IOException
+  {
+    stream.close();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void mark(int readlimit)
+  {
+    stream.mark(readlimit);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public boolean markSupported()
+  {
+    return stream.markSupported();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public ORB orb()
+  {
+    return stream.orb();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Object read_abstract_interface()
+  {
+    return stream.read_abstract_interface();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Object read_abstract_interface(Class clz)
+  {
+    return stream.read_abstract_interface(clz);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Any read_any()
+  {
+    return stream.read_any();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_boolean_array(boolean[] value, int offset, int length)
+  {
+    stream.read_boolean_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public boolean read_boolean()
+  {
+    return stream.read_boolean();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_char_array(char[] value, int offset, int length)
+  {
+    stream.read_char_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public char read_char()
+  {
+    return stream.read_char();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Context read_Context()
+  {
+    return stream.read_Context();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_double_array(double[] value, int offset, int length)
+  {
+    stream.read_double_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public double read_double()
+  {
+    return stream.read_double();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public BigDecimal read_fixed()
+  {
+    return stream.read_fixed();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_float_array(float[] value, int offset, int length)
+  {
+    stream.read_float_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public float read_float()
+  {
+    return stream.read_float();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_long_array(int[] value, int offset, int length)
+  {
+    stream.read_long_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int read_long()
+  {
+    return stream.read_long();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_longlong_array(long[] value, int offset, int length)
+  {
+    stream.read_longlong_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public long read_longlong()
+  {
+    return stream.read_longlong();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public org.omg.CORBA.Object read_Object()
+  {
+    return stream.read_Object();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public org.omg.CORBA.Object read_Object(Class klass)
+  {
+    return stream.read_Object(klass);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_octet_array(byte[] value, int offset, int length)
+  {
+    stream.read_octet_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public byte read_octet()
+  {
+    return stream.read_octet();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Principal read_Principal()
+  {
+    return stream.read_Principal();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_short_array(short[] value, int offset, int length)
+  {
+    stream.read_short_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public short read_short()
+  {
+    return stream.read_short();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public String read_string()
+  {
+    return stream.read_string();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public TypeCode read_TypeCode()
+  {
+    return stream.read_TypeCode();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ulong_array(int[] value, int offset, int length)
+  {
+    stream.read_ulong_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int read_ulong()
+  {
+    return stream.read_ulong();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ulonglong_array(long[] value, int offset, int length)
+  {
+    stream.read_ulonglong_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public long read_ulonglong()
+  {
+    return stream.read_ulonglong();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ushort_array(short[] value, int offset, int length)
+  {
+    stream.read_ushort_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public short read_ushort()
+  {
+    return stream.read_ushort();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Serializable read_value()
+  {
+    return read_value((Serializable) null);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_wchar_array(char[] value, int offset, int length)
+  {
+    stream.read_wchar_array(value, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public char read_wchar()
+  {
+    return stream.read_wchar();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public String read_wstring()
+  {
+    return stream.read_wstring();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int read()
+    throws IOException
+  {
+    return stream.read();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int read(byte[] b, int off, int len)
+    throws IOException
+  {
+    return stream.read(b, off, len);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int read(byte[] b)
+    throws IOException
+  {
+    return stream.read(b);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void reset()
+    throws IOException
+  {
+    stream.reset();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public long skip(long n)
+    throws IOException
+  {
+    return stream.skip(n);
+  }
+
+  /**
+   * Get a string representation.
+   */
+  public String toString()
+  {
+    return "HeadlessInput+" + stream.toString();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public String[] _truncatable_ids()
+  {
+    return stream._truncatable_ids();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public Object read_Abstract()
+  {
+    return stream.read_Abstract();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_any_array(AnySeqHolder holder, int offset, int length)
+  {
+    stream.read_any_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_boolean_array(BooleanSeqHolder holder, int offset, int length)
+  {
+    stream.read_boolean_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_char_array(CharSeqHolder holder, int offset, int length)
+  {
+    stream.read_char_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_double_array(DoubleSeqHolder holder, int offset, int length)
+  {
+    stream.read_double_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_float_array(FloatSeqHolder holder, int offset, int length)
+  {
+    stream.read_float_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_long_array(LongSeqHolder holder, int offset, int length)
+  {
+    stream.read_long_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_longlong_array(LongLongSeqHolder holder, int offset,
+    int length)
+  {
+    stream.read_longlong_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_octet_array(OctetSeqHolder holder, int offset, int length)
+  {
+    stream.read_octet_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_short_array(ShortSeqHolder holder, int offset, int length)
+  {
+    stream.read_short_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ulong_array(ULongSeqHolder holder, int offset, int length)
+  {
+    stream.read_ulong_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ulonglong_array(ULongLongSeqHolder holder, int offset,
+    int length)
+  {
+    stream.read_ulonglong_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_ushort_array(UShortSeqHolder holder, int offset, int length)
+  {
+    stream.read_ushort_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to read_value.
+   */
+  public Serializable read_Value()
+  {
+    return read_value();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void read_wchar_array(WCharSeqHolder holder, int offset, int length)
+  {
+    stream.read_wchar_array(holder, offset, length);
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public int getPosition()
+  {
+    return stream.getPosition();
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public gnuRuntime getRunTime()
+  {
+    return stream.runtime;
+  }
+
+  /**
+   * Replace the instance of RunTime.
+   */
+  public void setRunTime(gnuRuntime a_runtime)
+  {
+    stream.runtime = a_runtime;
+  }
+
+  /**
+   * Delegates functionality to the underlying stream.
+   */
+  public void seek(int position)
+  {
+    stream.seek(position);
+  }
+
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/IDLTypeHelper.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/IDLTypeHelper.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/IDLTypeHelper.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/IDLTypeHelper.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,169 @@
+/* IDLTypeHelper.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * Handles case when the CORBA IDL type with the known helper is wrapped into
+ * Value type.
+ * 
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class IDLTypeHelper
+  implements BoxedValueHelper
+{
+  /**
+   * A helper class.
+   */
+  protected Class helper;
+
+  /**
+   * Argument values for Helper.id().
+   */
+  static final Object[] ARGS_ID_V = new Object[0];
+
+  /**
+   * Argument types for Helper.id()).
+   */
+  static final Class[] ARGS_ID = new Class[0];
+
+  /**
+   * Argument types for Helper.read.
+   */
+  static final Class[] ARGS_READ = new Class[] { org.omg.CORBA.portable.InputStream.class };
+
+  /**
+   * Create an IDLTypeHelper that works via given helper class.
+   */
+  public IDLTypeHelper(Class a_helperClass)
+  {
+    helper = a_helperClass;
+  }
+
+  /**
+   * Get the Id, returned by this helper (use reflection).
+   */
+  public String get_id()
+  {
+    try
+      {
+        Method m = helper.getMethod("id", ARGS_ID);
+        return (String) m.invoke(null, ARGS_ID_V);
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL(msg() + " id()");
+        m.minor = Minor.Boxed;
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Read an instance from the stream.
+   */
+  public Serializable read_value(InputStream input)
+  {
+    try
+      {
+        Method m = helper.getMethod("read", ARGS_READ);
+        return (Serializable) m.invoke(null, new Object[] { input });
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL(msg() + " read(..)");
+        m.minor = Minor.Boxed;        
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Write the instance to the stream.
+   */
+  public void write_value(OutputStream output, Serializable value)
+  {
+    try
+      {
+        Method[] m = helper.getMethods();
+
+        for (int i = 0; i < m.length; i++)
+          {
+            if (m[i].getName().equals("write")
+              && ((m[i].getModifiers() & Modifier.STATIC) != 0))
+              {
+                Class[] p = m[i].getParameterTypes();
+
+                if (p.length == 2 && OutputStream.class.isAssignableFrom(p[0])
+                  && p[1].isAssignableFrom(value.getClass()))
+                  {
+                    m[i].invoke(null, new Object[] { output, value });
+                    return;
+                  }
+              }
+          }
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL(msg() + " write(..)");
+        m.minor = Minor.Boxed;        
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Create the start of message for exceptions.
+   */
+  String msg()
+  {
+    return "Failed calling " + helper.getName() + " method: ";
+  }
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,633 @@
+/* LittleEndianInputStream.java --
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005  Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.DataInput;
+import java.io.EOFException;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PushbackInputStream;
+
+/**
+ * This class reads data in the Little Endian format. It reuses
+ * code from GNU Classpath DataInputStream.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ * @author Warren Levy (warrenl at cygnus.com)
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ */
+public class LittleEndianInputStream
+  extends FilterInputStream
+  implements AbstractDataInput
+{
+  // Byte buffer, used to make primitive read calls more efficient.
+  byte[] buf = new byte[ 8 ];
+
+  /**
+   * This constructor initializes a new <code>DataInputStream</code>
+   * to read from the specified subordinate stream.
+   *
+   * @param in The subordinate <code>InputStream</code> to read from
+   */
+  public LittleEndianInputStream(InputStream in)
+  {
+    super(in);
+  }
+
+  /**
+   * This method reads bytes from the underlying stream into the specified
+   * byte array buffer.  It will attempt to fill the buffer completely, but
+   * may return a short count if there is insufficient data remaining to be
+   * read to fill the buffer.
+   *
+   * @param b The buffer into which bytes will be read.
+   *
+   * @return The actual number of bytes read, or -1 if end of stream reached
+   * before reading any bytes.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public int read(byte[] b)
+           throws IOException
+  {
+    return in.read(b, 0, b.length);
+  }
+
+  /**
+   * This method reads bytes from the underlying stream into the specified
+   * byte array buffer.  It will attempt to read <code>len</code> bytes and
+   * will start storing them at position <code>off</code> into the buffer.
+   * This method can return a short count if there is insufficient data
+   * remaining to be read to complete the desired read length.
+   *
+   * @param b The buffer into which bytes will be read.
+   * @param off The offset into the buffer to start storing bytes.
+   * @param len The requested number of bytes to read.
+   *
+   * @return The actual number of bytes read, or -1 if end of stream reached
+   * before reading any bytes.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public int read(byte[] b, int off, int len)
+           throws IOException
+  {
+    return in.read(b, off, len);
+  }
+
+  /**
+   * This method reads a Java boolean value from an input stream.  It does
+   * so by reading a single byte of data.  If that byte is zero, then the
+   * value returned is <code>false</code>.  If the byte is non-zero, then
+   * the value returned is <code>true</code>.
+   * <p>
+   * This method can read a <code>boolean</code> written by an object
+   * implementing the <code>writeBoolean()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>boolean</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading
+   * the boolean
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeBoolean
+   */
+  public boolean readBoolean()
+                      throws IOException
+  {
+    return convertToBoolean(in.read());
+  }
+
+  /**
+   * This method reads a Java byte value from an input stream.  The value
+   * is in the range of -128 to 127.
+   * <p>
+   * This method can read a <code>byte</code> written by an object
+   * implementing the <code>writeByte()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>byte</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the byte
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeByte
+   */
+  public byte readByte()
+                throws IOException
+  {
+    return convertToByte(in.read());
+  }
+
+  /**
+   * This method reads a Java <code>char</code> value from an input stream.
+   * It operates by reading two bytes from the stream and converting them to
+   * a single 16-bit Java <code>char</code>.  The two bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to a <code>char</code> in
+   * the following manner:
+   * <p>
+   * <code>(char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)</code>
+   * <p>
+   * This method can read a <code>char</code> written by an object
+   * implementing the <code>writeChar()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>char</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the char
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeChar
+   */
+  public char readChar()
+                throws IOException
+  {
+    readFully(buf, 0, 2);
+    return convertToChar(buf);
+  }
+
+  /**
+   * This method reads a Java double value from an input stream.  It operates
+   * by first reading a <code>long</code> value from the stream by calling the
+   * <code>readLong()</code> method in this interface, then converts
+   * that <code>long</code> to a <code>double</code> using the
+   * <code>longBitsToDouble</code> method in the class
+   * <code>java.lang.Double</code>
+   * <p>
+   * This method can read a <code>double</code> written by an object
+   * implementing the <code>writeDouble()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>double</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading
+   * the double
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeDouble
+   * @see java.lang.Double#longBitsToDouble
+   */
+  public double readDouble()
+                    throws IOException
+  {
+    return Double.longBitsToDouble(readLong());
+  }
+
+  /**
+   * This method reads a Java float value from an input stream.  It
+   * operates by first reading an <code>int</code> value from the
+   * stream by calling the <code>readInt()</code> method in this
+   * interface, then converts that <code>int</code> to a
+   * <code>float</code> using the <code>intBitsToFloat</code> method
+   * in the class <code>java.lang.Float</code>
+   * <p>
+   * This method can read a <code>float</code> written by an object
+   * implementing the <code>writeFloat()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>float</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the float
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeFloat
+   * @see java.lang.Float#intBitsToFloat
+   */
+  public float readFloat()
+                  throws IOException
+  {
+    return Float.intBitsToFloat(readInt());
+  }
+
+  /**
+   * This method reads raw bytes into the passed array until the array is
+   * full.  Note that this method blocks until the data is available and
+   * throws an exception if there is not enough data left in the stream to
+   * fill the buffer.  Note also that zero length buffers are permitted.
+   * In this case, the method will return immediately without reading any
+   * bytes from the stream.
+   *
+   * @param b The buffer into which to read the data
+   *
+   * @exception EOFException If end of file is reached before filling the
+   * buffer
+   * @exception IOException If any other error occurs
+   */
+  public void readFully(byte[] b)
+                 throws IOException
+  {
+    readFully(b, 0, b.length);
+  }
+
+  /**
+   * This method reads raw bytes into the passed array <code>buf</code>
+   * starting
+   * <code>offset</code> bytes into the buffer.  The number of bytes read
+   * will be
+   * exactly <code>len</code>.  Note that this method blocks until the data is
+   * available and throws an exception if there is not enough data left in
+   * the stream to read <code>len</code> bytes.  Note also that zero length
+   * buffers are permitted.  In this case, the method will return immediately
+   * without reading any bytes from the stream.
+   *
+   * @param buf The buffer into which to read the data
+   * @param offset The offset into the buffer to start storing data
+   * @param len The number of bytes to read into the buffer
+   *
+   * @exception EOFException If end of file is reached before filling the
+   * buffer
+   * @exception IOException If any other error occurs
+   */
+  public void readFully(byte[] buf, int offset, int len)
+                 throws IOException
+  {
+    if (len < 0)
+      throw new IndexOutOfBoundsException("Negative length: " + len);
+
+    while (len > 0)
+      {
+        // in.read will block until some data is available.
+        int numread = in.read(buf, offset, len);
+        if (numread < 0)
+          throw new EOFException();
+        len -= numread;
+        offset += numread;
+      }
+  }
+
+  /**
+   * This method reads a Java <code>int</code> value from an input stream
+   * It operates by reading four bytes from the stream and converting them to
+   * a single Java <code>int</code>.  The bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> through <code>byte4</code> represent
+   * the first four bytes read from the stream, they will be
+   * transformed to an <code>int</code> in the following manner:
+   * <p>
+   * <code>(int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) +
+   * ((byte3 & 0xFF)<< 8) + (byte4 & 0xFF)))</code>
+   * <p>
+   * The value returned is in the range of -2147483648 to 2147483647.
+   * <p>
+   * This method can read an <code>int</code> written by an object
+   * implementing the <code>writeInt()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>int</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the int
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeInt
+   */
+  public int readInt()
+              throws IOException
+  {
+    readFully(buf, 0, 4);
+    return convertToInt(buf);
+  }
+
+  /**
+   * This method reads the next line of text data from an input
+   * stream.  It operates by reading bytes and converting those bytes
+   * to <code>char</code> values by treating the byte read as the low
+   * eight bits of the <code>char</code> and using 0 as the high eight
+   * bits.  Because of this, it does not support the full 16-bit
+   * Unicode character set.
+   * <p>
+   * The reading of bytes ends when either the end of file or a line
+   * terminator is encountered.  The bytes read are then returned as a
+   * <code>String</code> A line terminator is a byte sequence
+   * consisting of either <code>\r</code>, <code>\n</code> or
+   * <code>\r\n</code>.  These termination charaters are discarded and
+   * are not returned as part of the string.
+   * <p>
+   * This method can read data that was written by an object implementing the
+   * <code>writeLine()</code> method in <code>DataOutput</code>.
+   *
+   * @return The line read as a <code>String</code>
+   *
+   * @exception IOException If an error occurs
+   *
+   * @see DataOutput
+   *
+   * @deprecated
+   */
+  public String readLine()
+                  throws IOException
+  {
+    StringBuffer strb = new StringBuffer();
+
+    while (true)
+      {
+        int c = in.read();
+        if (c == -1) // got an EOF
+          return strb.length() > 0 ? strb.toString() : null;
+        if (c == '\r')
+          {
+            int next_c = in.read();
+            if (next_c != '\n' && next_c != -1)
+              {
+                if (!(in instanceof PushbackInputStream))
+                  in = new PushbackInputStream(in);
+                ((PushbackInputStream) in).unread(next_c);
+              }
+            break;
+          }
+        if (c == '\n')
+          break;
+        strb.append((char) c);
+      }
+
+    return strb.length() > 0 ? strb.toString() : "";
+  }
+
+  /**
+   * This method reads a Java <code>long</code> value from an input stream
+   * It operates by reading eight bytes from the stream and converting them to
+   * a single Java <code>long</code>.  The bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> through <code>byte8</code> represent
+   * the first eight bytes read from the stream, they will be
+   * transformed to an <code>long</code> in the following manner:
+   * <p>
+   * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) +
+   * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) +
+   * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) +
+   * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF)))
+   * </code>
+   * <p>
+   * The value returned is in the range of -9223372036854775808 to
+   * 9223372036854775807.
+   * <p>
+   * This method can read an <code>long</code> written by an object
+   * implementing the <code>writeLong()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>long</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the long
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeLong
+   */
+  public long readLong()
+                throws IOException
+  {
+    readFully(buf, 0, 8);
+    return convertToLong(buf);
+  }
+
+  /**
+   * This method reads a signed 16-bit value into a Java in from the
+   * stream.  It operates by reading two bytes from the stream and
+   * converting them to a single 16-bit Java <code>short</code>.  The
+   * two bytes are stored most significant byte first (i.e., "big
+   * endian") regardless of the native host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to a <code>short</code>. in
+   * the following manner:
+   * <p>
+   * <code>(short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF))</code>
+   * <p>
+   * The value returned is in the range of -32768 to 32767.
+   * <p>
+   * This method can read a <code>short</code> written by an object
+   * implementing the <code>writeShort()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The <code>short</code> value read
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeShort
+   */
+  public short readShort()
+                  throws IOException
+  {
+    readFully(buf, 0, 2);
+    return convertToShort(buf);
+  }
+
+  /**
+   * This method reads 8 unsigned bits into a Java <code>int</code>
+   * value from the stream. The value returned is in the range of 0 to
+   * 255.
+   * <p>
+   * This method can read an unsigned byte written by an object
+   * implementing the <code>writeUnsignedByte()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The unsigned bytes value read as a Java <code>int</code>.
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeByte
+   */
+  public int readUnsignedByte()
+                       throws IOException
+  {
+    return convertToUnsignedByte(in.read());
+  }
+
+  /**
+   * This method reads 16 unsigned bits into a Java int value from the stream.
+   * It operates by reading two bytes from the stream and converting them to
+   * a single Java <code>int</code>  The two bytes are stored most
+   * significant byte first (i.e., "big endian") regardless of the native
+   * host byte ordering.
+   * <p>
+   * As an example, if <code>byte1</code> and <code>byte2</code>
+   * represent the first and second byte read from the stream
+   * respectively, they will be transformed to an <code>int</code> in
+   * the following manner:
+   * <p>
+   * <code>(int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF))</code>
+   * <p>
+   * The value returned is in the range of 0 to 65535.
+   * <p>
+   * This method can read an unsigned short written by an object
+   * implementing the <code>writeUnsignedShort()</code> method in the
+   * <code>DataOutput</code> interface.
+   *
+   * @return The unsigned short value read as a Java <code>int</code>
+   *
+   * @exception EOFException If end of file is reached before reading the value
+   * @exception IOException If any other error occurs
+   *
+   * @see DataOutput#writeShort
+   */
+  public int readUnsignedShort()
+                        throws IOException
+  {
+    readFully(buf, 0, 2);
+    return convertToUnsignedShort(buf);
+  }
+
+  /**
+   * This method attempts to skip and discard the specified number of bytes
+   * in the input stream.  It may actually skip fewer bytes than requested.
+   * This method will not skip any bytes if passed a negative number of bytes
+   * to skip.
+   *
+   * @param n The requested number of bytes to skip.
+   *
+   * @return The requested number of bytes to skip.
+   *
+   * @exception IOException If an error occurs.
+   * @specnote The JDK docs claim that this returns the number of bytes
+   *  actually skipped. The JCL claims that this method can throw an
+   *  EOFException. Neither of these appear to be true in the JDK 1.3's
+   *  implementation. This tries to implement the actual JDK behaviour.
+   */
+  public int skipBytes(int n)
+                throws IOException
+  {
+    if (n <= 0)
+      return 0;
+    try
+      {
+        return (int) in.skip(n);
+      }
+    catch (EOFException x)
+      {
+        // do nothing.
+      }
+    return n;
+  }
+
+  protected boolean convertToBoolean(int b)
+                              throws EOFException
+  {
+    if (b < 0)
+      throw new EOFException();
+
+    return (b != 0);
+  }
+
+  protected byte convertToByte(int i)
+                        throws EOFException
+  {
+    if (i < 0)
+      throw new EOFException();
+
+    return (byte) i;
+  }
+
+  protected int convertToUnsignedByte(int i)
+                               throws EOFException
+  {
+    if (i < 0)
+      throw new EOFException();
+
+    return (i & 0xFF);
+  }
+
+  /**
+   * Less significant byte first.
+   */
+  protected char convertToChar(byte[] buf)
+  {
+    return (char) ((buf [ 1 ] << 8) | (buf [ 0 ] & 0xff));
+  }
+
+  /**
+   * Less significant byte first.
+   */
+  protected short convertToShort(byte[] buf)
+  {
+    return (short) ((buf [ 1 ] << 8) | (buf [ 0 ] & 0xff));
+  }
+
+  /**
+   * Less significant byte first.
+   */
+  protected int convertToUnsignedShort(byte[] buf)
+  {
+    return (((buf [ 1 ] & 0xff) << 8) | (buf [ 0 ] & 0xff));
+  }
+
+  /**
+   * Less significant byte first.
+   */
+  protected int convertToInt(byte[] buf)
+  {
+    return (((buf [ 3 ] & 0xff) << 24) | ((buf [ 2 ] & 0xff) << 16) |
+           ((buf [ 1 ] & 0xff) << 8) | (buf [ 0 ] & 0xff));
+  }
+
+  /**
+   * Less significant byte first.
+   */
+  protected long convertToLong(byte[] buf)
+  {
+    return (((long) (buf [ 7 ] & 0xff) << 56) |
+           ((long) (buf [ 6 ] & 0xff) << 48) |
+           ((long) (buf [ 5 ] & 0xff) << 40) |
+           ((long) (buf [ 4 ] & 0xff) << 32) |
+           ((long) (buf [ 3 ] & 0xff) << 24) |
+           ((long) (buf [ 2 ] & 0xff) << 16) |
+           ((long) (buf [ 1 ] & 0xff) << 8) | ((long) (buf [ 0 ] & 0xff)));
+  }
+
+  /**
+   * This should never be called.
+   *
+   * @throws InternalError, always.
+   */
+  public String readUTF()
+  {
+    throw new InternalError();
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianOutputStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianOutputStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianOutputStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/LittleEndianOutputStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,253 @@
+/* LittleEndianOutputStream.java --
+   Copyright (C) 1998, 2001, 2003, 2005  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * This stream writes data in the Little Endian format
+ * (less significant byte first). This is opposite to the
+ * usual data presentation in java platform.
+ *
+ * This class reuses code from DataOutputStream.
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ * @author Aaron M. Renn (arenn at urbanophile.com)
+ * @author Tom Tromey (tromey at cygnus.com)
+ */
+public class LittleEndianOutputStream
+  extends FilterOutputStream
+  implements AbstractDataOutput
+{
+  /**
+   * This method initializes an instance of <code>DataOutputStream</code> to
+   * write its data to the specified underlying <code>OutputStream</code>
+   *
+   * @param out The subordinate <code>OutputStream</code> to which this
+   * object will write
+   */
+  public LittleEndianOutputStream(OutputStream out)
+  {
+    super(out);
+  }
+
+  /**
+   * This method flushes any unwritten bytes to the underlying stream.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public void flush()
+             throws IOException
+  {
+    out.flush();
+  }
+
+  /**
+   * This method writes the specified byte (passed as an <code>int</code>)
+   * to the underlying output stream.
+   *
+   * @param value The <code>byte</code> to write, passed as an <code>int</code>.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public synchronized void write(int value)
+                          throws IOException
+  {
+    out.write(value);
+  }
+
+  /**
+   * This method writes <code>len</code> bytes from the specified byte array
+   * <code>buf</code> starting at position <code>offset</code> into the
+   * buffer to the underlying output stream.
+   *
+   * @param buf The byte array to write from.
+   * @param offset The index into the byte array to start writing from.
+   * @param len The number of bytes to write.
+   *
+   * @exception IOException If an error occurs.
+   */
+  public synchronized void write(byte[] buf, int offset, int len)
+                          throws IOException
+  {
+    out.write(buf, offset, len);
+  }
+
+  /**
+   * This method writes a Java boolean value to an output stream.  If
+   * <code>value</code> is <code>true</code>, a byte with the value of
+   * 1 will be written, otherwise a byte with the value of 0 will be
+   * written.
+   *
+   * The value written can be read using the <code>readBoolean</code>
+   * method in <code>DataInput</code>.
+   *
+   * @param value The <code>boolean</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   *
+   * @see DataInput#readBoolean
+   */
+  public void writeBoolean(boolean value)
+                    throws IOException
+  {
+    write(value ? 1 : 0);
+  }
+
+  /**
+   * This method writes a Java byte value to an output stream.  The
+   * byte to be written will be in the lowest 8 bits of the
+   * <code>int</code> value passed.
+   *
+   * The value written can be read using the <code>readByte</code> or
+   * <code>readUnsignedByte</code> methods in <code>DataInput</code>.
+   *
+   * @param value The <code>byte</code> to write to the stream, passed as
+   * the low eight bits of an <code>int</code>.
+   *
+   * @exception IOException If an error occurs
+   *
+   * @see DataInput#readByte
+   * @see DataInput#readUnsignedByte
+   */
+  public void writeByte(int value)
+                 throws IOException
+  {
+    write(value & 0xff);
+  }
+
+  /**
+   * This method writes a Java short value to an output stream.
+   *
+   * @param value The <code>short</code> value to write to the stream,
+   * passed as an <code>int</code>.
+   *
+   * @exception IOException If an error occurs
+   */
+  public synchronized void writeShort(int value)
+                               throws IOException
+  {
+    write((byte) (0xff & value));
+    write((byte) (0xff & (value >> 8)));
+  }
+
+  /**
+   * Writes char in Little Endian.
+   */
+  public synchronized void writeChar(int value)
+                              throws IOException
+  {
+    write((byte) (0xff & value));
+    write((byte) (0xff & (value >> 8)));
+  }
+
+  /**
+   * Writes int in Little Endian.
+   */
+  public synchronized void writeInt(int value)
+                             throws IOException
+  {
+    write((byte) (0xff & value));
+    write((byte) (0xff & (value >> 8)));
+    write((byte) (0xff & (value >> 16)));
+    write((byte) (0xff & (value >> 24)));
+  }
+
+  /**
+   * Writes long in Little Endian.
+   */
+  public synchronized void writeLong(long value)
+                              throws IOException
+  {
+    write((byte) (0xff & value));
+    write((byte) (0xff & (value >> 8)));
+    write((byte) (0xff & (value >> 16)));
+    write((byte) (0xff & (value >> 24)));
+    write((byte) (0xff & (value >> 32)));
+    write((byte) (0xff & (value >> 40)));
+    write((byte) (0xff & (value >> 48)));
+    write((byte) (0xff & (value >> 56)));
+  }
+
+  /**
+   * This method writes a Java <code>float</code> value to the stream.  This
+   * value is written by first calling the method
+   * <code>Float.floatToIntBits</code>
+   * to retrieve an <code>int</code> representing the floating point number,
+   * then writing this <code>int</code> value to the stream exactly the same
+   * as the <code>writeInt()</code> method does.
+   *
+   * @param value The <code>float</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   *
+   * @see writeInt
+   * @see DataInput#readFloat
+   * @see Float#floatToIntBits
+   */
+  public void writeFloat(float value)
+                  throws IOException
+  {
+    writeInt(Float.floatToIntBits(value));
+  }
+
+  /**
+   * This method writes a Java <code>double</code> value to the stream.  This
+   * value is written by first calling the method
+   * <code>Double.doubleToLongBits</code>
+   * to retrieve an <code>long</code> representing the floating point number,
+   * then writing this <code>long</code> value to the stream exactly the same
+   * as the <code>writeLong()</code> method does.
+   *
+   * @param value The <code>double</code> value to write to the stream
+   *
+   * @exception IOException If an error occurs
+   *
+   * @see writeLong
+   * @see DataInput#readDouble
+   * @see Double#doubleToLongBits
+   */
+  public void writeDouble(double value)
+                   throws IOException
+  {
+    writeLong(Double.doubleToLongBits(value));
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/UnknownExceptionCtxHandler.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,292 @@
+/* UnknownExceptionCtxHandler.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.ObjectCreator;
+import gnu.CORBA.GIOP.ServiceContext;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.StringValueHelper;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.lang.reflect.Constructor;
+import java.util.StringTokenizer;
+
+import javax.rmi.CORBA.Util;
+
+/**
+ * Reads the data about an unknown exception from the UnknownExceptionInfo.
+ * 
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class UnknownExceptionCtxHandler
+  extends Vio
+{
+  /**
+   * Encode exception and add its recored to the message service contexts.
+   */
+  public static ServiceContext[] addExceptionContext(ServiceContext[] current,
+    Throwable exception, Object details)
+  {
+    try
+      {
+        ServiceContext[] c = new ServiceContext[current.length + 1];
+        if (current.length > 0)
+          System.arraycopy(current, 0, c, 0, current.length);
+
+        BufferedCdrOutput output = new BufferedCdrOutput();
+
+        if (details instanceof OutputStream)
+          output.setOrb(((OutputStream) output).orb());
+
+        if (details instanceof AbstractCdrOutput)
+          ((AbstractCdrOutput) details).cloneSettings(output);
+
+        write(output, exception);
+
+        ServiceContext xc = new ServiceContext();
+        xc.context_id = ServiceContext.UnknownExceptionInfo;
+        xc.context_data = output.buffer.toByteArray();
+        c[current.length] = xc;
+        return c;
+      }
+    catch (Exception ex)
+      {
+        ex.printStackTrace();
+        return current;
+      }
+  }
+
+  /**
+   * Write data about unknown exception.
+   */
+  public static void write(BufferedCdrOutput output, Throwable t)
+  {
+    t.fillInStackTrace();
+    output.write_Value(t);
+  }
+
+  /**
+   * Read the data about an unknown exception from the UnknownExceptionInfo.
+   * Following the documentation, this must be just value type, but it seems
+   * that in Sun's implementation is is not, as starts from 0x0. For value type,
+   * this would be null.
+   * 
+   * TODO Implement reading and writing in Sun format, making Classpath IIOP
+   * interoperable with Sun's implementation. Current inmplementation reads and
+   * reproduces the exception class type only.
+   * 
+   * @param input the input stream to read the context (orb and other settings
+   * are inherited from the main stream that received the message).
+   * 
+   * @param contexts all service contexts that were present in the message.
+   * 
+   * @return the Throwable, extracted from context, on null, if this has failed.
+   */
+  public static Throwable read(BufferredCdrInput input, ServiceContext[] contexts)
+  {
+    input.mark(Integer.MAX_VALUE);
+
+    int h = input.read_long();
+    if (h == 0)
+      {
+        // This block reads exception info in the Sun specific format.
+        // (currently we read the exception name only).
+        try
+          {
+            // We may need to jump back if the value is read via value
+            // factory.
+            input.mark(512);
+
+            int value_tag = input.read_long();
+            checkTag(value_tag);
+
+            String codebase = null;
+            String[] ids = null;
+            String id = null;
+
+            // Check for the agreed null value.
+            if (value_tag == vt_NULL)
+              return null;
+            else if (value_tag == vt_INDIRECTION)
+              return (Throwable) readIndirection(input);
+            else
+              {
+                // Read the value.
+                if ((value_tag & vf_CODEBASE) != 0)
+                  {
+                    // The codebase is present. The codebase is a space
+                    // separated list of URLs from where the implementing
+                    // code can be downloaded.
+                    codebase = read_string(input);
+                  }
+
+                if ((value_tag & vf_MULTIPLE_IDS) != 0)
+                  {
+                    // Multiple supported repository ids are present.
+                    ids = read_string_array(input);
+                  }
+                else if ((value_tag & vf_ID) != 0)
+                  {
+                    // Single supported repository id is present.
+                    id = read_string(input);
+                  }
+              }
+
+            java.lang.Object ox = createInstance(id, ids, codebase);
+
+            return (Throwable) ox;
+          }
+        catch (Exception ex)
+          {
+            ex.printStackTrace();
+            return null;
+          }
+      }
+    else
+      {
+        input.reset();
+        // Read as defined in OMG documentation.
+        return (Throwable) input.read_Value();
+      }
+  }
+
+  /**
+   * Load exception by name and create the instance. The reason why this is
+   * different from Vio is because some exceptions have no parameterless
+   * constructor, but have a constructor with the string parameter instead.
+   */
+  static Object createInstance(String id, String[] ids, String codebase)
+  {
+    Object o = _createInstance(id, codebase);
+
+    if (ids != null)
+      for (int i = 0; i < ids.length && o == null; i++)
+        o = _createInstance(ids[i], codebase);
+    return o;
+  }
+
+  static Object _createInstance(String id, String codebase)
+  {
+    if (id == null)
+      return null;
+    if (id.equals(StringValueHelper.id()))
+      return "";
+    StringTokenizer st = new StringTokenizer(id, ":");
+
+    String prefix = st.nextToken();
+    if (prefix.equalsIgnoreCase("IDL"))
+      return ObjectCreator.Idl2Object(id);
+    else if (prefix.equalsIgnoreCase("RMI"))
+      {
+        String className = st.nextToken();
+        String hashCode = st.nextToken();
+        String sid = null;
+        if (st.hasMoreElements())
+          sid = st.nextToken();
+
+        try
+          {
+            Class objectClass = Util.loadClass(className, codebase,
+              Vio.class.getClassLoader());
+
+            String rid = ObjectCreator.getRepositoryId(objectClass);
+
+            if (!rid.equals(id))
+              {
+                // If direct string comparison fails, compare by meaning.
+                StringTokenizer st2 = new StringTokenizer(rid, ":");
+                if (!st2.nextToken().equals("RMI"))
+                  throw new InternalError("RMI format expected: '" + rid + "'");
+                if (!st2.nextToken().equals(className))
+                  throwIt("Class name mismatch", id, rid, null);
+
+                try
+                  {
+                    long h1 = Long.parseLong(hashCode, 16);
+                    long h2 = Long.parseLong(st2.nextToken(), 16);
+                    if (h1 != h2)
+                      throwIt("Hashcode mismatch", id, rid, null);
+
+                    if (sid != null && st2.hasMoreTokens())
+                      {
+                        long s1 = Long.parseLong(hashCode, 16);
+                        long s2 = Long.parseLong(st2.nextToken(), 16);
+                        if (s1 != s2)
+                          throwIt("serialVersionUID mismatch", id, rid, null);
+                      }
+                  }
+                catch (NumberFormatException e)
+                  {
+                    throwIt("Invalid hashcode or svuid format: ", id, rid, e);
+                  }
+              }
+
+            // Some RemoteExceptions have no public parameterless constructor,
+            // but they have constructor taking string as parameter.
+            try
+              {
+                return objectClass.newInstance();
+              }
+            catch (Exception ex)
+              {
+                // Try instantiate passing string as parameter.
+                Constructor c = objectClass.getConstructor(new Class[] { String.class });
+                return c.newInstance(new Object[] { "<message unavailable>" });
+              }
+          }
+        catch (MARSHAL m)
+          {
+            m.minor = Minor.Instantiation;
+            throw m;
+          }
+        catch (Exception ex)
+          {
+            MARSHAL m = new MARSHAL("Unable to instantiate " + id);
+            m.minor = Minor.Instantiation;
+            m.initCause(ex);
+            throw m;
+          }
+      }
+    else
+      throw new NO_IMPLEMENT("Unsupported prefix " + prefix + ":");
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/VMVio.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/VMVio.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/VMVio.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/VMVio.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,101 @@
+/* VMVio.java -- Native operations, required by value IO.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+ GNU Classpath is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU Classpath is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU Classpath; see the file COPYING.  If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library.  Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module.  An independent module is a module which is not derived from
+ or based on this library.  If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so.  If you do not wish to do so, delete this
+ exception statement from your version. */
+
+/**
+ * This is a temporary replacement for the native call that would allocate 
+ * objects without public constructors. The replacement only allocates
+ * objects with public parameterless constructor and objects with public
+ * constructor taking string (like some Throwables).
+ *
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ * 
+ * TODO FIXME replace by native call like in VMObjectInputStream.
+ * Required modification of Classpath the build system.
+ */
+
+
+package gnu.CORBA.CDR;
+
+import java.lang.reflect.Constructor;
+
+public class VMVio
+{
+  /**
+   * Allocates a new Object of type clazz but without running the default
+   * constructor on it. It then calls the given constructor on it. The given
+   * constructor method comes from the constr_clazz which is a super class of
+   * the given clazz.
+   */
+  public static Object allocateObject(Class clazz, Class constr_clazz,
+    Constructor constructor)
+    throws InstantiationException
+  {
+    try
+      {
+        Constructor c = clazz.getConstructor(new Class[0]);
+        c.setAccessible(true);
+        return c.newInstance(new Object[0]);
+      }
+    catch (Exception ex)
+      {
+        try
+          {
+            Constructor c = clazz.getConstructor(new Class[] { String.class });
+            return c.newInstance(new Object[] { "" });
+          }
+        catch (Exception ex2)
+          {
+            Constructor c[] = clazz.getConstructors();
+
+            for (int i = 0; i < c.length; i++)
+              {
+                try
+                  {
+                    c[i].setAccessible(true);
+                    Class[] args = c[i].getParameterTypes();
+                    return c[i].newInstance(new Object[args.length]);
+                  }
+                catch (Exception ex3)
+                  {
+                    // Try another one.
+                  }
+              }
+          }
+        throw new InstantiationException(clazz.getName());
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/Vio.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/Vio.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/Vio.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/Vio.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1473 @@
+/* Vio.java -- Value type IO operations.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.ObjectCreator;
+
+import org.omg.CORBA.CustomMarshal;
+import org.omg.CORBA.DataInputStream;
+import org.omg.CORBA.DataOutputStream;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.StringSeqHelper;
+import org.omg.CORBA.StringValueHelper;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.WStringValueHelper;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.ValueFactory;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Modifier;
+import java.util.StringTokenizer;
+
+import javax.rmi.CORBA.Util;
+import javax.rmi.CORBA.ValueHandler;
+
+/**
+ * A specialised class for reading and writing the value types.
+ * 
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public abstract class Vio
+{
+  /**
+   * If true, wrap value type data into chunks. This decrease the performance,
+   * and is not required for interoperability with jdk 1.5, but is left in the
+   * implementation as the optional mode for solving possible interoperability
+   * problems with non-Sun CORBA implementations.
+   * 
+   * The current implementation would accept both single chunk or multiple
+   * chunks, but will always send a single chunk (if true) or unchunked data (if
+   * false).
+   */
+  public static boolean USE_CHUNKING = false;
+
+  /**
+   * The first field in the value record. The last octet may contain additional
+   * flags (vf_CODEBASE, vf_ID and vf_MULTIPLE_IDS). The tag value is different
+   * for the indirections (vt_INDIRECTION) and nulls (vt_NULL).
+   */
+  public static final int vt_VALUE_TAG = 0x7fffff00;
+
+  /**
+   * The value tag flag, indicating that the codebase URL is present in the
+   * value tag record.
+   */
+  public static final int vf_CODEBASE = 0x1;
+
+  /**
+   * The value tag flag, indicating that a single repository id is present in
+   * the value tag record.
+   */
+  public static final int vf_ID = 0x2;
+
+  /**
+   * The value tag flag, indicating, that there are multiple repository ids
+   * present in the record. If this flag is set, the flag vf_ID must also be
+   * set, resulting the value of the least significant byte 0x6.
+   */
+  public static final int vf_MULTIPLE_IDS = 0x4;
+
+  /**
+   * The value tag flag, indicating the presence of chunking. Each chunk is
+   * preceeded by a positive int, indicating the number of bytes in the chunk. A
+   * sequence of chunks is terminated by a non positive int.
+   */
+  public static final int vf_CHUNKING = 0x8;
+
+  /**
+   * The indirection tag value. Such tag must be followed by the CORBA long,
+   * indicating the offset in the CORBA message, where the indirected
+   * information is present. This offset is assumed zero at the position where
+   * the mentioned CORBA long starts and can refer both forward (positive
+   * values) and backward (negative values).
+   */
+  public static final int vt_INDIRECTION = 0xffffffff;
+
+  /**
+   * This tag value means that the value object being transferred is equal to
+   * null.
+   */
+  public static final int vt_NULL = 0x0;
+
+  /**
+   * The size of CORBA long (java int).
+   */
+  static final int INT_SIZE = 4;
+
+  /**
+   * The String value helper (one instance is sufficient).
+   */
+  public static final WStringValueHelper m_StringValueHelper = new WStringValueHelper();
+
+  /**
+   * An instance of the value handler.
+   */
+  static ValueHandler handler = Util.createValueHandler();
+
+  /**
+   * Read the value base from the given input stream. Determines the required
+   * class from the repository id. This includes operations that are not
+   * required when an unitialised instance or at least class of the value type
+   * is known. Hence it may be faster to use the alternative methods,
+   * read(InputStream, Class) or read(InputStream, Serializable).
+   * 
+   * @param input a stream to read from.
+   * @param repository_id a repository id of the object being read, may be null.
+   * 
+   * @return the loaded value.
+   * 
+   * @throws MARSHAL if the reading has failed due any reason.
+   */
+  public static Serializable read(InputStream input)
+  {
+    return read(input, (String) null);
+  }
+
+  /**
+   * Read the value base from the given input stream. Determines the required
+   * class from the repository id. This includes operations that are not
+   * required when an unitialised instance or at least class of the value type
+   * is known. Hence it may be faster to use the alternative methods,
+   * read(InputStream, Class) or read(InputStream, Serializable).
+   * 
+   * @param an_input a stream to read from.
+   * @param repository_id a repository id of the object being read, may be null.
+   * 
+   * @return the loaded value.
+   * 
+   * @throws MARSHAL if the reading has failed due any reason.
+   */
+  public static Serializable read(InputStream input, String repository_id)
+  {
+    try
+      {
+        final int position = getCurrentPosition(input);
+        // We may need to jump back if the value is read via value factory.
+        input.mark(512);
+
+        int value_tag = input.read_long();
+        checkTag(value_tag);
+
+        String codebase = null;
+        String[] ids = null;
+        String id = repository_id;
+
+        // Check for the agreed null value.
+        if (value_tag == vt_NULL)
+          return null;
+        else if (value_tag == vt_INDIRECTION)
+          return readIndirection(input);
+        else
+          {
+            // Read the value.
+            if ((value_tag & vf_CODEBASE) != 0)
+              {
+                // The codebase is present. The codebase is a space
+                // separated list of URLs from where the implementing
+                // code can be downloaded.
+                codebase = read_string(input);
+              }
+
+            if ((value_tag & vf_MULTIPLE_IDS) != 0)
+              {
+                // Multiple supported repository ids are present.
+                ids = read_string_array(input);
+              }
+            else if ((value_tag & vf_ID) != 0)
+              {
+                // Single supported repository id is present.
+                id = read_string(input);
+              }
+          }
+
+        BoxedValueHelper helper = getHelper(null, id);
+        // The existing implementing object.
+        java.lang.Object ox = null;
+
+        if (helper != null)
+          ox = null; // Helper will care about the instantiating.
+        else if (id.equals(WStringValueHelper.id()))
+          helper = m_StringValueHelper;
+        else
+          ox = createInstance(id, ids, codebase);
+        return (Serializable) read_instance(input, position, ox, value_tag,
+          helper, id, ids, codebase);
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL();
+        m.minor = Minor.Value;        
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Read the value base from the given input stream when the value base class
+   * is available. Hence there is no need to guess it from the repository id.
+   * 
+   * @param input a stream to read from.
+   * @param value_class the class of the value being read.
+   * 
+   * @return the loaded value.
+   * 
+   * @throws MARSHAL if the reading has failed due any reason.
+   */
+  public static Serializable read(InputStream input, Class value_class)
+  {
+    final int position = getCurrentPosition(input);
+
+    String id = null;
+    String[] ids = null;
+    String codebase = null;
+
+    try
+      {
+        int value_tag = input.read_long();
+        checkTag(value_tag);
+
+        // Check for the agreed null value.
+        if (value_tag == vt_NULL)
+          return null;
+        else if (value_tag == vt_INDIRECTION)
+          return readIndirection(input);
+        else
+          {
+            // Read the value.
+            if ((value_tag & vf_CODEBASE) != 0)
+              {
+                // The codebase is present.
+                codebase = read_string(input);
+              }
+
+            if ((value_tag & vf_MULTIPLE_IDS) != 0)
+              {
+                // Multiple supported repository ids are present.
+                ids = read_string_array(input);
+              }
+            else if ((value_tag & vf_ID) != 0)
+              {
+                // Single supported repository id is present.
+                id = read_string(input);
+              }
+          }
+
+        BoxedValueHelper vHelper = id != null ? getHelper(value_class, id)
+          : getHelper(value_class, ids);
+
+        java.lang.Object ox;
+
+        if (vHelper == null)
+          {
+            try
+              {
+                ox = createInstance(id, ids, codebase);
+              }
+            catch (Exception e)
+              {
+                ox = null;
+              }
+
+            if (ox != null)
+              {
+                if (value_class != null
+                  && !value_class.isAssignableFrom(ox.getClass()))
+                  {
+                    MARSHAL m = new MARSHAL(ox.getClass() + " is not a "
+                    + value_class.getName());
+                    m.minor = Minor.ClassCast;
+                    throw m;
+                  }
+              }
+          }
+        else
+          ox = null;
+
+        ox = read_instance(input, position, ox, value_tag, vHelper, id, ids,
+          codebase);
+        return (Serializable) ox;
+      }
+    catch (MARSHAL m)
+      {
+        throw m;
+      }
+    catch (SystemException sysEx)
+      {
+        // OK.
+        throw sysEx;
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL("Cant read " + value_class);
+        m.minor = Minor.Value;
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Read the value base from the given input stream when the unitialised
+   * instance is available. Hence there is no need to guess the class from the
+   * repository id and then to instantiate an instance.
+   * 
+   * @param input a stream to read from.
+   * 
+   * @param value_instance an pre-created instance of the value. If the helper
+   * is not null, this parameter is ignored an should be null.
+   * 
+   * @param helper a helper to create an instance and read the object- specific
+   * part of the record. If the value_instance is used instead, this parameter
+   * should be null.
+   * 
+   * @return the loaded value.
+   * 
+   * @throws MARSHAL if the reading has failed due any reason.
+   */
+  public static Object read(InputStream input, Object value_instance,
+    BoxedValueHelper helper)
+  {
+    final int position = getCurrentPosition(input);
+
+    String id = null;
+    String[] ids = null;
+    String codebase = null;
+
+    try
+      {
+        int value_tag = input.read_long();
+        checkTag(value_tag);
+
+        // Check for the agreed null value.
+        if (value_tag == vt_NULL)
+          return null;
+        else if (value_tag == vt_INDIRECTION)
+          return readIndirection(input);
+        else
+          {
+            // Read the value.
+            if ((value_tag & vf_CODEBASE) != 0)
+              {
+                // The codebase is present.
+                codebase = read_string(input);
+              }
+
+            if ((value_tag & vf_MULTIPLE_IDS) != 0)
+              {
+                // Multiple supported repository ids are present.
+                ids = read_string_array(input);
+              }
+            else if ((value_tag & vf_ID) != 0)
+              {
+                // Single supported repository id is present.
+                id = read_string(input);
+              }
+          }
+
+        Class value_class = value_instance == null ? null
+          : value_instance.getClass();
+
+        if (helper == null)
+          helper = id != null ? getHelper(value_class, id) : getHelper(
+            value_class, ids);
+
+        value_instance = read_instance(input, position, value_instance,
+          value_tag, helper, id, ids, codebase);
+        return value_instance;
+      }
+    catch (Exception ex)
+      {
+        MARSHAL m = new MARSHAL();
+        m.minor = Minor.Value;
+        m.initCause(ex);
+        throw m;
+      }
+  }
+
+  /**
+   * Read using provided boxed value helper. This method expects the full value
+   * type header, followed by contents, that are delegated to the provided
+   * helper. It handles null.
+   * 
+   * @param input the stream to read from.
+   * @param helper the helper that reads the type-specific part of the content.
+   * 
+   * @return the value, created by the helper, or null if the header indicates
+   * that null was previously written.
+   */
+  public static Serializable read(InputStream input, BoxedValueHelper helper)
+  {
+    return (Serializable) read(input, null, helper);
+  }
+
+  /**
+   * Fill in the instance fields by the data from the input stream. The method
+   * assumes that the value header, if any, is already behind. The information
+   * from the stream is stored into the passed ox parameter.
+   * 
+   * @param input an input stream to read from.
+   * 
+   * @param value a pre-instantiated value type object, must be either
+   * Streamable or CustomMarshal. If the helper is used, this parameter is
+   * ignored and should be null.
+   * 
+   * @param value_tag the tag that must be read previously.
+   * @param helper the helper for read object specific part; may be null to read
+   * in using other methods.
+   * 
+   * @return the value that was read.
+   */
+  static Object read_instance(InputStream input, final int position,
+    Object value, int value_tag, BoxedValueHelper helper, String id,
+    String[] ids, String codebase)
+  {
+    if (helper != m_StringValueHelper && id != null)
+      if (id.equals(StringValueHelper.id()))
+        {
+          value = null;
+          helper = m_StringValueHelper;
+        }
+
+    try
+      {
+        if ((value_tag & vf_CHUNKING) != 0)
+          {
+            BufferedCdrOutput output = createBuffer(input, 1024);
+            // Read the current (not a nested one) value in this spec case.
+            readNestedValue(value_tag, input, output, -1);
+            BufferredCdrInput ci = new BufferredCdrInput(output.buffer.getBuffer());
+            ci.setRunTime(output.getRunTime());
+
+            input = new HeadlessInput(ci, input);
+          }
+        else
+          {
+            if (input instanceof BufferredCdrInput)
+              {
+                // Highly probable case.
+                input = new HeadlessInput((BufferredCdrInput) input, null);
+              }
+            else if (input instanceof HeadlessInput)
+              {
+                // There is no need to instantiate one more HeadlessInput
+                // as we can just reset.
+                ((HeadlessInput) input).subsequentCalls = false;
+              }
+            else
+              {
+                BufferedCdrOutput bout = new BufferedCdrOutput();
+                int c;
+                while ((c = input.read()) >= 0)
+                  bout.write((byte) c);
+                input = new HeadlessInput(
+                  (BufferredCdrInput) bout.create_input_stream(), input);
+              }
+          }
+      }
+    catch (IOException ex)
+      {
+        MARSHAL m = new MARSHAL("Unable to read chunks");
+        m.minor = Minor.Value;
+        m.initCause(ex);
+        throw m;
+      }
+
+    return readValue(input, position, value, helper, id, ids, codebase);
+  }
+
+  /**
+   * Create a buffer, inheriting critical settings from the passed input stream.
+   */
+  private static BufferedCdrOutput createBuffer(InputStream input, int proposed_size)
+  {
+    BufferedCdrOutput bout;
+    bout = new BufferedCdrOutput(2 * proposed_size + 256);
+
+    if (input instanceof BufferredCdrInput)
+      {
+        BufferredCdrInput in = (BufferredCdrInput) input;
+        bout.setBigEndian(in.isBigEndian());
+      }
+
+    if (input instanceof gnuValueStream)
+      bout.setRunTime(((gnuValueStream) input).getRunTime());
+    else
+      bout.setRunTime(new gnuRuntime(null, null));
+    return bout;
+  }
+
+  /**
+   * Read the chunked nested value from the given input stream, transferring the
+   * contents to the given output stream.
+   * 
+   * @param value_tag the value tag of the value being read.
+   * @param input the input stream from where the remainder of the nested value
+   * must be read.
+   * @param output the output stream where the unchunked nested value must be
+   * copied.
+   * 
+   * @return the tag that ended the nested value.
+   */
+  public static int readNestedValue(int value_tag, InputStream input,
+    BufferedCdrOutput output, int level)
+    throws IOException
+  {
+    String id = null;
+    if (level < -1)
+      {
+        // For the first level, this information is already behind.
+        output.write_long(value_tag - vf_CHUNKING);
+
+        // The nested value should be aways chunked.
+        if ((value_tag & vf_CHUNKING) == 0)
+          {
+            MARSHAL m = new MARSHAL("readNestedValue: must be chunked");
+            m.minor = Minor.Chunks;
+            throw m;
+          }
+        else if (value_tag == vt_NULL)
+          {
+            MARSHAL m = new MARSHAL("readNestedValue: nul");
+            m.minor = Minor.Chunks;
+            throw m;
+          }
+        else if (value_tag == vt_INDIRECTION)
+          {
+            MARSHAL m = new MARSHAL("readNestedValue: indirection");
+            m.minor = Minor.Chunks;
+            throw m;
+          }
+        else
+          {
+            // Read the value.
+            if ((value_tag & vf_CODEBASE) != 0)
+              {
+                String codebase = read_string(input);
+                write_string(output, codebase);
+              }
+
+            if ((value_tag & vf_MULTIPLE_IDS) != 0)
+              {
+                // Multiple supported repository ids are present.
+                String[] ids = read_string_array(input);
+                id = ids[0];
+                write_string_array(output, ids);
+              }
+            else if ((value_tag & vf_ID) != 0)
+              {
+                id = read_string(input);
+                write_string(output, id);
+              }
+          }
+      }
+
+    int n = -1;
+
+    // Read all chunks.
+    int chunk_size;
+
+    byte[] r = null;
+
+    while (true)
+      {
+        // Read the size of the next chunk or it may also be the
+        // header of the nested value.
+        chunk_size = input.read_long();
+
+        // End of chunk terminator.
+        if (chunk_size < 0 && chunk_size >= level)
+          return chunk_size;
+        else if (chunk_size >= 0x7FFFFF00)
+          {
+            int onInput = getCurrentPosition(input) - 4;
+            int onOutput = output.getPosition();
+            output.getRunTime().redirect(onInput, onOutput);
+            // Value over 0x7FFFFF00 indicates that the nested value
+            // starts here. Read the nested value, storing it into the output.
+            // First parameter is actually the value tag.
+            chunk_size = readNestedValue(chunk_size, input, output, level - 1);
+            if (chunk_size < 0 && chunk_size >= level)
+              return chunk_size;
+          }
+        else
+          {
+            // The chunk follows.
+            if (r == null || r.length < chunk_size)
+              r = new byte[chunk_size + 256];
+
+            n = 0;
+            reading: while (n < chunk_size)
+              n += input.read(r, n, chunk_size - n);
+            output.write(r, 0, n);
+          }
+      }
+  }
+
+  /**
+   * Read the value (the header must be behind).
+   */
+  public static Serializable readValue(InputStream input, final int position,
+    Object value, BoxedValueHelper helper, String id, String[] ids,
+    String codebase)
+  {
+    gnuRuntime g;
+    gnuValueStream c = ((gnuValueStream) input);
+    if (c.getRunTime() == null)
+      {
+        g = new gnuRuntime(codebase, value);
+        c.setRunTime(g);
+      }
+    else
+      {
+        g = c.getRunTime();
+        g.addCodeBase(codebase);
+        g.target = (Serializable) value;
+      }
+    if (value != null)
+      g.objectWritten(value, position);
+
+    if (input instanceof HeadlessInput)
+      ((HeadlessInput) input).subsequentCalls = false;
+
+    boolean ok = true;
+
+    // The user-defined io operations are implemented.
+    if (value instanceof CustomMarshal)
+      {
+        CustomMarshal marsh = (CustomMarshal) value;
+        marsh.unmarshal((DataInputStream) input);
+      }
+    else
+    // The IDL-generated io operations are implemented.
+    if (value instanceof Streamable)
+      {
+        ((Streamable) value)._read(input);
+      }
+    else if (helper != null)
+      {
+        // If helper is non-null the value should normally be null.
+        value = helper.read_value(input);
+        g.objectWritten(value, position);
+      }
+    else
+      {
+        ok = false;
+        ValueFactory factory = null;
+        org.omg.CORBA_2_3.ORB orb = (org.omg.CORBA_2_3.ORB) input.orb();
+
+        if (id != null)
+          factory = orb.lookup_value_factory(id);
+
+        if (factory == null && ids != null)
+          {
+            for (int i = 0; i < ids.length && factory == null; i++)
+              {
+                factory = orb.lookup_value_factory(ids[i]);
+              }
+          }
+
+        if (factory != null)
+          {
+            value = factory.read_value((org.omg.CORBA_2_3.portable.InputStream) input);
+            ok = true;
+          }
+      }
+
+    if (!ok && value instanceof Serializable)
+    // Delegate to ValueHandler
+      {
+        if (ids != null && ids.length > 0)
+          id = ids[0];
+
+        value = handler.readValue(input, position, value.getClass(), id, g);
+        ok = true;
+      }
+
+    if (!ok)
+      {
+        if (value != null)
+          {
+            MARSHAL m = new MARSHAL(value.getClass().getName()
+            + " must be Streamable, CustomMarshal or Serializable");
+            m.minor = Minor.UnsupportedValue;
+            throw m;
+          }
+        else
+          {
+            MARSHAL m = new MARSHAL("Unable to instantiate " + id + ":" + list(ids)
+            + " helper " + helper);
+            m.minor = Minor.UnsupportedValue;
+            throw m;
+          }
+      }
+    else
+      return (Serializable) value;
+  }
+
+  /**
+   * Conveniency method to list ids in exception reports.
+   */
+  static String list(String[] s)
+  {
+    if (s == null)
+      return "null";
+    else
+      {
+        StringBuffer b = new StringBuffer("{");
+        for (int i = 0; i < s.length; i++)
+          {
+            b.append(s[i]);
+            b.append(" ");
+          }
+        b.append("}");
+        return b.toString();
+      }
+  }
+
+  /**
+   * Write the value base into the given stream.
+   * 
+   * @param output a stream to write to.
+   * 
+   * @param value a value type object, must be either Streamable or
+   * CustomMarshal.
+   * 
+   * @throws MARSHAL if the writing failed due any reason.
+   */
+  public static void write(OutputStream output, Serializable value)
+  {
+    // Write null if this is a null value.
+    if (value == null)
+      output.write_long(vt_NULL);
+    else if (value instanceof String)
+      write(output, value, m_StringValueHelper);
+    else
+      write(output, value, value.getClass());
+  }
+
+  /**
+   * Write the value base into the given stream, stating that it is an instance
+   * of the given class.
+   * 
+   * @param output a stream to write to.
+   * 
+   * @param value a value to write.
+   * 
+   * @throws MARSHAL if the writing failed due any reason.
+   */
+  public static void write(OutputStream output, Serializable value,
+    Class substitute)
+  {
+    // Write null if this is a null value.
+    if (value == null)
+      output.write_long(vt_NULL);
+    else if (value instanceof String || substitute == String.class)
+      writeString(output, value);
+    else
+      {
+        String vId = ObjectCreator.getRepositoryId(value.getClass());
+        if (substitute == null || value.getClass().equals(substitute))
+          write_instance(output, value, vId, getHelper(value.getClass(), vId));
+        else
+          {
+            String vC = ObjectCreator.getRepositoryId(substitute);
+            String[] ids = new String[] { vId, vC };
+            BoxedValueHelper h = getHelper(substitute.getClass(), ids);
+            // If the helper is available, it is also responsible for
+            // providing the repository Id. Otherwise, write both
+            // ids.
+            if (h == null)
+              write_instance(output, value, ids, null);
+            else
+              write_instance(output, value, h.get_id(), null);
+          }
+      }
+  }
+
+  /**
+   * Write the value base into the given stream, supplementing it with an array
+   * of the provided repository ids plus the repository id, derived from the
+   * passed value.
+   * 
+   * @param output a stream to write to.
+   * 
+   * @param value a value to write.
+   * 
+   * @throws MARSHAL if the writing failed due any reason.
+   */
+  public static void write(OutputStream output, Serializable value,
+    String[] multiple_ids)
+  {
+    // Write null if this is a null value.
+    if (value == null)
+      output.write_long(vt_NULL);
+    else
+      {
+        String[] ids = new String[multiple_ids.length + 1];
+        ids[0] = ObjectCreator.getRepositoryId(value.getClass());
+        System.arraycopy(multiple_ids, 0, ids, 1, multiple_ids.length);
+        BoxedValueHelper h = getHelper(value.getClass(), ids);
+        write_instance(output, value, ids, h);
+      }
+  }
+
+  /**
+   * Write value when its repository Id is explicitly given. Only this Id is
+   * written, the type of value is not taken into consideration.
+   * 
+   * @param output an output stream to write into.
+   * @param value a value to write.
+   * @param id a value repository id.
+   */
+  public static void write(OutputStream output, Serializable value, String id)
+  {
+    if (value == null)
+      output.write_long(vt_NULL);
+    else
+      write_instance(output, value, id, getHelper(value.getClass(), id));
+  }
+
+  /**
+   * Write standard value type header, followed by contents, produced by the
+   * boxed value helper.
+   * 
+   * @param output the stream to write to.
+   * @param value the value to write, can be null.
+   * @param helper the helper that writes the value content if it is not null
+   * (must be provided for this method).
+   */
+  public static void write(OutputStream output, Serializable value,
+    BoxedValueHelper helper)
+  {
+    if (helper == null)
+      throw new AssertionError("Helper must be provided");
+    if (value == null)
+      output.write_long(vt_NULL);
+    else
+      write_instance(output, value, helper.get_id(), helper);
+  }
+
+  /**
+   * Write the parameter that is surely a string and not null.
+   */
+  private static void writeString(OutputStream output, Serializable string)
+  {
+    write_instance(output, string, m_StringValueHelper.get_id(),
+      m_StringValueHelper);
+  }
+
+  /**
+   * Write value when its repository Id is explicitly given. Does not handle
+   * null.
+   * 
+   * @param output an output stream to write into.
+   * @param value a value to write.
+   * @param id a value repository id (can be either single string or string
+   * array).
+   * @param helper a helper, writing object - specifical part. Can be null if
+   * the value should be written using other methods.
+   */
+  static void write_instance(OutputStream output, Serializable value,
+    Object ids, BoxedValueHelper helper)
+  {
+    gnuValueStream rout = null;
+    gnuRuntime runtime = null;
+
+    try
+      {
+        if (output instanceof gnuValueStream)
+          {
+            int position;
+            rout = (gnuValueStream) output;
+            runtime = rout.getRunTime();
+
+            if (runtime == null)
+              {
+                runtime = new gnuRuntime(null, value);
+                rout.setRunTime(runtime);
+                rout.getRunTime().objectWritten(value,
+                  position = rout.getPosition());
+              }
+            else if (runtime.target == value)
+              {
+                if (!writeSelf(output, value))
+                  throw new InternalError("Recursive helper call for "
+                    + value.getClass().getName());
+                return;
+              }
+            else
+              {
+                position = runtime.isWrittenAt(value);
+                if (position >= 0)
+                  {
+                    // The object was already written.
+                    output.write_long(vt_INDIRECTION);
+                    output.write_long(position - rout.getPosition());
+                    // Replacing object write data by indirection reference.
+                    return;
+                  }
+                else
+                  {
+                    runtime.objectWritten(value, position = rout.getPosition());
+                  }
+              }
+          }
+
+        int value_tag = vt_VALUE_TAG;
+
+        if (ids instanceof String)
+          value_tag |= vf_ID;
+        else if (ids instanceof String[])
+          // OMG standard requires to set both flags.
+          value_tag |= vf_MULTIPLE_IDS | vf_ID;
+
+        int chunkSizeLocation;
+
+        OutputStream outObj;
+
+        if (USE_CHUNKING)
+          {
+            // Wrap the value being written into one chunk (makes sense only for
+            // compatibility reasons).
+            outObj = output;
+            value_tag |= vf_CHUNKING;
+          }
+        else
+          outObj = output;
+
+        output.write_long(value_tag);
+
+        if ((value_tag & vf_MULTIPLE_IDS) != 0)
+          write_string_array(output, (String[]) ids);
+        else if ((value_tag & vf_ID) != 0)
+          write_string(output, (String) ids);
+
+        if (USE_CHUNKING)
+          {
+            // So far, write 0x55555555 instead of the chunk size (alignment may
+            // take place).
+            output.write_long(0x55555555);
+            // If the chunking is involved, the chunk size must be written here.
+            chunkSizeLocation = rout.getPosition() - INT_SIZE;
+          }
+        else
+          // Not in use for this case.
+          chunkSizeLocation = -1;
+
+        writeValue(outObj, value, helper);
+
+        if (USE_CHUNKING)
+          {
+            // Write the chunk size where the place for it was reserved.
+            int chunkSize = rout.getPosition() - chunkSizeLocation - INT_SIZE;
+            int current = rout.getPosition();
+            rout.seek(chunkSizeLocation);
+            output.write_long(chunkSize);
+            rout.seek(current);
+
+            // The end of record marker.
+            output.write_long(-1);
+          }
+      }
+    finally
+      {
+        if (runtime != null)
+          runtime.target = null;
+      }
+  }
+
+  /**
+   * Write value (after header).
+   */
+  static void writeValue(OutputStream output, Serializable value,
+    BoxedValueHelper helper)
+  {
+    ((gnuValueStream) output).getRunTime().target = value;
+    if (helper != null)
+      helper.write_value(output, value);
+    else if (!writeSelf(output, value))
+      {
+        // Try to find helper via class loader.
+        boolean ok = false;
+
+        if (!ok)
+          {
+            if (output instanceof BufferedCdrOutput)
+              {
+                BufferedCdrOutput b = (BufferedCdrOutput) output;
+                if (b.runtime == null)
+                  b.runtime = new gnuRuntime(null, value);
+              }
+
+            handler.writeValue(output, value);
+          }
+      }
+  }
+
+  /**
+   * Try to write value supposing that it implements self-streamable interfaces.
+   * Return false if it does not or true on success.
+   */
+  static boolean writeSelf(OutputStream output, Serializable value)
+  {
+    // User defined write method is present.
+    if (value instanceof CustomMarshal)
+      {
+        ((CustomMarshal) value).marshal((DataOutputStream) output);
+        return true;
+      }
+    else if (value instanceof Streamable)
+      {
+        ((Streamable) value)._write(output);
+        return true;
+      }
+    return false;
+  }
+
+  /**
+   * Read the indirection data and return the object that was already written to
+   * this stream.
+   * 
+   * @param an_input the input stream, must be BufferredCdrInput.
+   */
+  static Serializable readIndirection(InputStream an_input)
+  {
+    if (!(an_input instanceof gnuValueStream))
+      throw new NO_IMPLEMENT(gnuValueStream.class.getName()
+        + " expected as parameter");
+
+    gnuValueStream in = (gnuValueStream) an_input;
+
+    int current_pos = in.getPosition();
+
+    int offset = an_input.read_long();
+    if (offset > -INT_SIZE)
+      {
+        MARSHAL m = new MARSHAL("Indirection tag refers to " + offset
+        + " (must be less than -" + INT_SIZE + ")");
+        m.minor = Minor.Offset;
+        throw m;
+      }
+
+    int stored_at = current_pos + offset;
+
+    if (in.getRunTime() == null)
+      {
+        MARSHAL m = new MARSHAL(stored_at + " offset " + offset + ": not written");
+        m.minor = Minor.Value;
+        throw m;
+      }
+
+    return (Serializable) in.getRunTime().isObjectWrittenAt(stored_at, offset);
+  }
+
+  /**
+   * Check the passed value tag for correctness.
+   * 
+   * @param value_tag a tag to check, must be between 0x7fffff00 and 0x7fffffff
+   * 
+   * @throws MARSHAL if the tag is outside this interval.
+   */
+  static void checkTag(int value_tag)
+  {
+    if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff)
+      && value_tag != vt_NULL && value_tag != vt_INDIRECTION)
+      {
+        MARSHAL m = new MARSHAL("Invalid value record, unsupported header tag: "
+        + value_tag + " (0x" + Integer.toHexString(value_tag) + ")");
+        m.minor = Minor.ValueHeaderTag;
+        throw m;
+      }
+
+    if ((value_tag & vf_MULTIPLE_IDS) != 0 && (value_tag & vf_ID) == 0)
+      {
+        MARSHAL m = new MARSHAL("Invalid value record header flag combination (0x"
+        + Integer.toHexString(value_tag) + ")");
+        m.minor = Minor.ValueHeaderFlags;
+        throw m;
+      }
+  }
+
+  /**
+   * Throw MARSHAL.
+   */
+  static void throwIt(String msg, String id1, String id2, Throwable e)
+    throws MARSHAL
+  {
+    MARSHAL m = new MARSHAL(msg + ":'" + id1 + "' versus '" + id2 + "'");
+    if (e != null)
+      m.initCause(e);
+    m.minor = Minor.Value;
+    throw m;
+  }
+
+  /**
+   * Load class by name and create the instance.
+   */
+  static Object createInstance(String id, String[] ids, String codebase)
+  {
+    Object o = null;
+
+    if (id != null)
+      o = _createInstance(id, codebase);
+
+    if (ids != null)
+      for (int i = 0; i < ids.length && o == null; i++)
+        o = _createInstance(ids[i], codebase);
+    return o;
+  }
+
+  static Object _createInstance(String id, String codebase)
+  {
+    if (id == null)
+      return null;
+    if (id.equals(StringValueHelper.id()))
+      return "";
+    StringTokenizer st = new StringTokenizer(id, ":");
+
+    String prefix = st.nextToken();
+    if (prefix.equalsIgnoreCase("IDL"))
+      return ObjectCreator.Idl2Object(id);
+    else if (prefix.equalsIgnoreCase("RMI"))
+      {
+        String className = st.nextToken();
+        String hashCode = st.nextToken();
+        String sid = null;
+        if (st.hasMoreElements())
+          sid = st.nextToken();
+
+        try
+          {
+            Class objectClass = Util.loadClass(className, codebase,
+              Vio.class.getClassLoader());
+
+            String rid = ObjectCreator.getRepositoryId(objectClass);
+
+            if (!rid.equals(id))
+              {
+                // If direct string comparison fails, compare by meaning.
+                StringTokenizer st2 = new StringTokenizer(rid, ":");
+                if (!st2.nextToken().equals("RMI"))
+                  throw new InternalError("RMI format expected: '" + rid + "'");
+                if (!st2.nextToken().equals(className))
+                  throwIt("Class name mismatch", id, rid, null);
+
+                try
+                  {
+                    long h1 = Long.parseLong(hashCode, 16);
+                    long h2 = Long.parseLong(st2.nextToken(), 16);
+                    if (h1 != h2)
+                      throwIt("Hashcode mismatch", id, rid, null);
+
+                    if (sid != null && st2.hasMoreTokens())
+                      {
+                        long s1 = Long.parseLong(hashCode, 16);
+                        long s2 = Long.parseLong(st2.nextToken(), 16);
+                        if (s1 != s2)
+                          throwIt("serialVersionUID mismatch", id, rid, null);
+                      }
+                  }
+                catch (NumberFormatException e)
+                  {
+                    throwIt("Invalid hashcode or svuid format: ", id, rid, e);
+                  }
+              }
+
+            // Low - level instantiation required here.
+            return instantiateAnyWay(objectClass);
+          }
+        catch (Exception ex)
+          {
+            MARSHAL m = new MARSHAL("Unable to instantiate " + id);
+            m.minor = Minor.Instantiation;
+            m.initCause(ex);
+            throw m;
+          }
+      }
+    else
+      throw new NO_IMPLEMENT("Unsupported prefix " + prefix + ":");
+  }
+
+  /**
+   * Read string, expecting the probable indirection.
+   */
+  static String read_string(InputStream input)
+  {
+    gnuValueStream g = (gnuValueStream) input;
+    int previous = g.getPosition();
+    int l = input.read_long();
+    if (l != vt_INDIRECTION)
+      {
+        g.seek(previous);
+        String s = input.read_string();
+        if (g.getRunTime() == null)
+          g.setRunTime(new gnuRuntime(null, null));
+        g.getRunTime().singleIdWritten(s, previous);
+        return s;
+      }
+    else
+      {
+        gnuRuntime r = g.getRunTime();
+        int base = g.getPosition();
+        int delta = input.read_long();
+        if (r == null)
+          {
+            previous = g.getPosition();
+            g.seek(base + delta);
+            String indir = input.read_string();
+            g.seek(previous);
+            return indir;
+          }
+        else
+          {
+            return (String) r.isObjectWrittenAt(base + delta, delta);
+          }
+      }
+  }
+
+  /**
+   * Read string array, expecting the probable indirection.
+   */
+  static String[] read_string_array(InputStream input)
+  {
+    gnuValueStream g = (gnuValueStream) input;
+    int previous = g.getPosition();
+    int l = input.read_long();
+    if (l != vt_INDIRECTION)
+      {
+        g.seek(previous);
+        String[] s = StringSeqHelper.read(input);
+        if (g.getRunTime() == null)
+          g.setRunTime(new gnuRuntime(null, null));
+        g.getRunTime().objectWritten(s, previous);
+        return s;
+      }
+    else
+      {
+        gnuRuntime r = g.getRunTime();
+        int base = g.getPosition();
+        int delta = input.read_long();
+        if (r == null)
+          {
+            previous = g.getPosition();
+            g.seek(base + delta);
+            String[] indir = StringSeqHelper.read(input);
+            g.seek(previous);
+            return indir;
+          }
+        else
+          {
+            return (String[]) r.isObjectWrittenAt(base + delta, delta);
+          }
+      }
+  }
+
+  /**
+   * Write repository Id, probably shared.
+   */
+  static void write_string(OutputStream output, String id)
+  {
+    if (output instanceof gnuValueStream)
+      {
+        gnuValueStream b = (gnuValueStream) output;
+        if (b != null)
+          {
+            int written = b.getRunTime().idWrittenAt(id);
+            if (written >= 0)
+              {
+                // Reuse existing id record.
+                output.write_long(vt_INDIRECTION);
+                int p = b.getPosition();
+                output.write_long(written - p);
+              }
+            else
+              {
+                b.getRunTime().singleIdWritten(id, b.getPosition());
+                output.write_string(id);
+              }
+          }
+      }
+    else
+      output.write_string(id);
+  }
+
+  /**
+   * Write repository Id, probably shared.
+   */
+  static void write_string_array(OutputStream output, String[] ids)
+  {
+    if (output instanceof gnuValueStream)
+      {
+        gnuValueStream b = (gnuValueStream) output;
+        if (b != null)
+          {
+            int written = b.getRunTime().idWrittenAt(ids);
+            if (written >= 0)
+              {
+                // Reuse existing id record.
+                output.write_long(vt_INDIRECTION);
+                int p = b.getPosition();
+                output.write_long(written - p);
+              }
+            else
+              {
+                b.getRunTime().multipleIdsWritten(ids, b.getPosition());
+                StringSeqHelper.write(output, ids);
+              }
+          }
+      }
+    else
+      StringSeqHelper.write(output, ids);
+  }
+
+  /**
+   * Get the helper that could write the given object, or null if no pre-defined
+   * helper available for this object.
+   */
+  public static BoxedValueHelper getHelper(Class x, Object ids)
+  {
+    if (x != null && x.equals(String.class))
+      return m_StringValueHelper;
+    else if (x != null && x.isArray())
+      return new ArrayValueHelper(x);
+    else if (ids instanceof String)
+      return locateHelper((String) ids);
+    else if (ids instanceof String[])
+      {
+        String[] ia = (String[]) ids;
+        BoxedValueHelper h;
+        for (int i = 0; i < ia.length; i++)
+          {
+            h = locateHelper(ia[i]);
+            if (h != null)
+              return h;
+          }
+        return null;
+      }
+    else
+      return null;
+  }
+
+  /**
+   * Get the helper that could write the given object, or null if no pre-defined
+   * helper available for this object.
+   */
+  public static BoxedValueHelper getHelper(Class x, String id)
+  {
+    if (x != null && x.equals(String.class))
+      return m_StringValueHelper;
+    else if (x != null && x.isArray())
+      return new ArrayValueHelper(x);
+    else
+      return locateHelper(id);
+  }
+
+  /**
+   * Try to locate helper from the repository id.
+   */
+  static BoxedValueHelper locateHelper(String id)
+  {
+    if (id != null)
+      {
+        if (id.equals(m_StringValueHelper.get_id()))
+          return m_StringValueHelper;
+        else
+        // Try to locate helper for IDL type.
+        if (id.startsWith("IDL:"))
+          {
+            try
+              {
+                Class helperClass = ObjectCreator.findHelper(id);
+                if (BoxedValueHelper.class.isAssignableFrom(helperClass))
+                  return (BoxedValueHelper) helperClass.newInstance();
+                else if (helperClass != null)
+                  return new IDLTypeHelper(helperClass);
+                else
+                  return null;
+              }
+            catch (Exception ex)
+              {
+                return null;
+              }
+          }
+      }
+    return null;
+  }
+
+  /**
+   * Get the current position.
+   */
+  static int getCurrentPosition(InputStream x)
+  {
+    if (x instanceof gnuValueStream)
+      return ((gnuValueStream) x).getPosition();
+    else
+      return 0;
+  }
+
+  /**
+   * Instantiate an instance of this class anyway; also in the case when it has
+   * no parameterless or any other constructor. The fields will be assigned
+   * while reading the class from the stream.
+   * 
+   * @param clazz a class for that the instance should be instantiated.
+   */
+  public static Object instantiateAnyWay(Class clazz)
+    throws Exception
+  {
+    Class first_nonserial = clazz;
+
+    while (Serializable.class.isAssignableFrom(first_nonserial)
+      || Modifier.isAbstract(first_nonserial.getModifiers()))
+      first_nonserial = first_nonserial.getSuperclass();
+
+    final Class local_constructor_class = first_nonserial;
+
+    Constructor constructor = local_constructor_class.getDeclaredConstructor(new Class[0]);
+
+    return VMVio.allocateObject(clazz, constructor.getDeclaringClass(),
+      constructor);
+  }
+}
\ No newline at end of file

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,336 @@
+/* gnuRuntime.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.Minor;
+
+import org.omg.CORBA.LocalObject;
+import org.omg.CORBA.MARSHAL;
+
+import java.io.Serializable;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+/**
+ * Our implementation of the sending context runtime.
+ * 
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class gnuRuntime
+  extends LocalObject
+  implements org.omg.SendingContext.RunTime
+{
+  /**
+   * The data entry about the object that was written.
+   */
+  static class Entry
+  {
+    /**
+     * The stream position, where the object was written.
+     */
+    int at;
+
+    /**
+     * The object that was written.
+     */
+    Object object;
+
+    public String toString()
+    {
+      return object + "[" + at + "] "+object.getClass().getName();
+    }
+  }
+
+  /**
+   * The instruction that the actual object is stored at different location.
+   * Used when processing chunked data where positions shifts due removing the
+   * chunking tags.
+   */
+  static class Redirection
+    extends Entry
+  {
+    public String toString()
+    {
+      return "->" + at;
+    }
+  }
+
+  /**
+   * Use serialVersionUID for interoperability.
+   */
+  private static final long serialVersionUID = 1;
+
+  /**
+   * The history of the written objects, maps object to records. The different
+   * objects must be treated as different regardless that .equals returns.
+   */
+  private Map sh_objects = new IdentityHashMap();
+
+  /**
+   * The written repository Ids that can be shared.
+   */
+  private Map sh_ids = new TreeMap(new Comparator()
+  {
+    public int compare(Object a, Object b)
+    {
+      if (a instanceof String && b instanceof String)
+        // Comparing string with string.
+        return ((String) a).compareTo((String) b);
+      else if (a instanceof String[] && b instanceof String[])
+        {
+          // Comparing array with array.
+          String[] sa = (String[]) a;
+          String[] sb = (String[]) b;
+
+          if (sa.length != sb.length)
+            return sa.length - sb.length;
+          else
+            {
+              int c;
+              for (int i = 0; i < sa.length; i++)
+                {
+                  c = sa[i].compareTo(sb[i]);
+                  if (c != 0)
+                    return c;
+                }
+              return 0;
+            }
+        }
+      else
+        // Comparing string with array.
+        return a instanceof String ? 1 : -1;
+    }
+  });
+
+  /**
+   * The history of the written objects, maps positions to records. The
+   * different objects must be treated as different regardless that .equals
+   * returns.
+   */
+  private Map positions = new HashMap();
+
+  /**
+   * The Codebase.
+   */
+  private String codebase;
+
+  /**
+   * The pre-created instance of the object being written (avoid
+   * re-instantiation).
+   */
+  public Serializable target;
+
+  /**
+   * Create Runtime.
+   * 
+   * @param a_id a repository Id, if only one Id was specified in the stream.
+   * @param a_ids a repository Ids, if the multiple Ids were specified in te
+   * stream.
+   * @param a_codabase a codebase, if it was specified in the stream.
+   */
+  public gnuRuntime(String a_codebase, Object a_target)
+  {
+    if (a_target instanceof Serializable)
+      target = (Serializable) a_target;
+
+    codebase = a_codebase;
+  }
+
+  /**
+   * Mark the given object as written at the given position.
+   */
+  public void objectWritten(Object object, int at)
+  {
+    if (object == null || at < 0)
+      return; // No positional information provided.
+    if (sh_objects.containsKey(object))
+      throw new AssertionError("Repetetive writing of the same object "
+        + object + " at " + at + dump());
+
+    Entry e = new Entry();
+    e.at = at;
+    e.object = object;
+
+    sh_objects.put(object, e);
+    positions.put(new Integer(at), e);
+  }
+
+  /**
+   * Check if the object is already written.
+   * 
+   * @return the position, at that the object is allready written or -1 if it is
+   * not yet written.
+   */
+  public int isWrittenAt(Object x)
+  {
+    Entry e = (Entry) sh_objects.get(x);
+    return e == null ? -1 : e.at;
+  }
+
+  /**
+   * Set redirection, indicating that the object, searched at the p_searched
+   * position can be actually found at the p_present position.
+   */
+  public void redirect(int p_searched, int p_present)
+  {
+    Redirection redirection = new Redirection();
+    redirection.at = p_present;
+    positions.put(new Integer(p_searched), redirection);
+  }
+
+  /**
+   * Get the object, written at the given position. This returs both shared
+   * objects and repository Ids.
+   * 
+   * @return the position, at that the object is allready written.
+   * 
+   * @throws MARSHAL if there is no object written at that position.
+   */
+  public Object isObjectWrittenAt(int x, int offset)
+  {
+    Entry e = (Entry) positions.get(new Integer(x));
+    if (e instanceof Redirection)
+      return isObjectWrittenAt(e.at, offset);
+    else if (e != null)
+      return e.object;
+    else
+      {
+        MARSHAL m = new MARSHAL("No object was written at " + x + 
+          " (offset " + offset + ") r " + this + dump());
+        m.minor = Minor.Graph;
+        throw m;
+      }
+  }
+
+  /**
+   * Mark the given object as written at the given position.
+   */
+  public void singleIdWritten(String id, int at)
+  {
+    if (sh_ids.containsKey(id))
+      throw new InternalError("Repetetive writing of the same string " +
+        id + dump());
+
+    Entry e = new Entry();
+    e.at = at;
+    e.object = id;
+
+    sh_ids.put(id, e);
+    positions.put(new Integer(at), e);
+  }
+
+  /**
+   * Mark the given object as written at the given position.
+   */
+  public void multipleIdsWritten(String[] ids, int at)
+  {
+    if (sh_ids.containsKey(ids))
+      throw new InternalError("Repetetive writing of the same string " + 
+        ids + dump());
+
+    Entry e = new Entry();
+    e.at = at;
+    e.object = ids;
+
+    sh_ids.put(ids, e);
+    positions.put(new Integer(at), e);
+  }
+
+  /**
+   * Check if the object is already written.
+   * 
+   * @return the position, at that the object is allready written or -1 if it is
+   * not yet written.
+   */
+  public int idWrittenAt(Object x)
+  {
+    Entry e = (Entry) sh_ids.get(x);
+    return e == null ? -1 : e.at;
+  }
+
+  /**
+   * Get the codebase.
+   */
+  public String getCodeBase()
+  {
+    return codebase;
+  }
+
+  /**
+   * Set the codebase, preserving the old value if the passed parameter is null
+   * and forming the space delimited list if both new and old values are not
+   * null.
+   */
+  public void addCodeBase(String base)
+  {
+    if (base != null)
+      {
+        if (codebase == null)
+          codebase = base;
+        else
+          codebase = codebase + " " + base;
+      }
+  }
+
+  /**
+   * Dump all objects that are currently stored.
+   */
+  public String dump()
+  {
+    StringBuffer b = new StringBuffer(" Stream content: \n");
+
+    // Sort by position.
+    TreeSet t = new TreeSet(positions.keySet());
+    Iterator p = t.iterator();
+
+    while (p.hasNext())
+      {
+        Object k = p.next();
+        b.append("     " + k + ": " + ((Entry) positions.get(k)).toString()
+          + "\n");
+      }
+    return b.toString();
+  }
+
+}

Added: llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuValueStream.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuValueStream.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuValueStream.java (added)
+++ llvm-gcc-4.2/trunk/libjava/classpath/gnu/CORBA/CDR/gnuValueStream.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,71 @@
+/* gnuValueStream.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+/**
+ * A stream, implementing this interface, provides methods to get/set a position
+ * and get the RunTime.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public interface gnuValueStream
+{
+  /**
+   * Get the current position in the buffer.
+   * 
+   * @return The position in the buffer, taking offset into consideration.
+   */
+  public int getPosition();
+  
+  /**
+   * Jump to the given position, taking offset into consideration.
+   */
+  public void seek(int position);
+  
+  /**
+   * Get the RunTime information. 
+   */
+  public gnuRuntime getRunTime();
+  
+  /**
+   * Replace the instance of RunTime. 
+   */
+  public void setRunTime(gnuRuntime a_runtime);
+  
+}





More information about the llvm-commits mailing list